Part Number Hot Search : 
115AE 2SC2732 UPG131GR V1015EIP CY7C104 E15CA AD667JN 1691A
Product Description
Full Text Search
 

To Download MC68HC11F1 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "typical" parameters can and do vary in different applications. all operating parameters, including "typicals" must be validated for each customer application by customer's technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and ! are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. ?motorola, inc. 1995 hc11 MC68HC11F1 technical data

MC68HC11F1 motorola technical data iii paragraph title page section 1introduction 1.1 features .................................................................................................... 1-1 section 2 pin descriptions 2.1 v dd and v ss .............................................................................................. 2-2 2.2 reset (reset ) .......................................................................................... 2-3 2.3 e-clock output (e) .................................................................................... 2-3 2.4 crystal driver and external clock input (xtal, extal) ........................... 2-3 2.5 four times e-clock frequency output (4xout) ..................................... 2-5 2.6 interrupt request (irq ) ............................................................................. 2-5 2.7 non-maskable interrupt (xirq ) ................................................................. 2-5 2.8 moda and modb (moda/lir and modb/v stby ) .................................. 2-6 2.9 v rh and v rl .............................................................................................. 2-6 2.10 r/w ........................................................................................................... 2-6 2.11 port signals ............................................................................................... 2-6 2.11.1 port a ................................................................................................ 2-7 2.11.2 port b ................................................................................................ 2-8 2.11.3 port c ................................................................................................ 2-8 2.11.4 port d ................................................................................................ 2-8 2.11.5 port e ................................................................................................ 2-9 2.11.6 port f ................................................................................................. 2-9 2.11.7 port g ................................................................................................ 2-9 section 3 central processing unit 3.1 cpu registers ........................................................................................... 3-1 3.1.1 accumulators a, b, and d ................................................................. 3-2 3.1.2 index register x (ix) ......................................................................... 3-3 3.1.3 index register y (iy) ......................................................................... 3-3 3.1.4 stack pointer (sp) ............................................................................. 3-3 3.1.5 program counter (pc) ...................................................................... 3-5 3.1.6 condition code register (ccr) ........................................................ 3-5 3.1.6.1 carry/borrow (c) ....................................................................... 3-5 3.1.6.2 overflow (v) .............................................................................. 3-5 3.1.6.3 zero (z) ..................................................................................... 3-6 3.1.6.4 negative (n) .............................................................................. 3-6 3.1.6.5 interrupt mask (i) ....................................................................... 3-6 3.1.6.6 half carry (h) ............................................................................ 3-6 3.1.6.7 x interrupt mask (x) .................................................................. 3-6 3.1.6.8 stop disable (s) ........................................................................ 3-7 table of contents
motorola MC68HC11F1 iv technical data (continued) paragraph title page table of contents 3.2 data types ................................................................................................ 3-7 3.3 opcodes and operands ............................................................................ 3-7 3.4 addressing modes ..................................................................................... 3-7 3.4.1 immediate .......................................................................................... 3-7 3.4.2 direct ................................................................................................. 3-8 3.4.3 extended ........................................................................................... 3-8 3.4.4 indexed .............................................................................................. 3-8 3.4.5 inherent ............................................................................................. 3-8 3.4.6 relative ............................................................................................. 3-8 3.5 instruction set ........................................................................................... 3-8 section 4operating modes and on-chip memory 4.1 operating modes ....................................................................................... 4-1 4.1.1 single-chip operating mode ............................................................. 4-1 4.1.2 expanded operating mode ............................................................... 4-1 4.1.3 special test mode ............................................................................. 4-1 4.1.4 special bootstrap mode .................................................................... 4-1 4.2 on-chip memory ....................................................................................... 4-2 4.2.1 mapping allocations .......................................................................... 4-2 4.2.2 memory map ..................................................................................... 4-3 4.2.2.1 ram .......................................................................................... 4-3 4.2.2.2 bootloader rom ....................................................................... 4-4 4.2.2.3 eeprom ................................................................................... 4-4 4.2.3 registers ........................................................................................... 4-4 4.3 system initialization ................................................................................... 4-6 4.3.1 mode selection .................................................................................. 4-7 4.3.1.1 hprio register ........................................................................ 4-8 4.3.2 initialization ........................................................................................ 4-9 4.3.2.1 config register ...................................................................... 4-9 4.3.2.2 init register ........................................................................... 4-10 4.3.2.3 option register .................................................................... 4-11 4.3.2.4 opt2 register ........................................................................ 4-12 4.3.2.5 block protect register (bprot) ............................................. 4-13 4.4 eeprom and config register ............................................................ 4-14 4.4.1 eeprom ......................................................................................... 4-14 4.4.1.1 eeprom programming .......................................................... 4-14 4.4.1.2 eeprom bulk erase .............................................................. 4-15 4.4.1.3 eeprom row erase .............................................................. 4-15 4.4.1.4 eeprom byte erase .............................................................. 4-16 4.4.2 pprog eeprom programming control register ......................... 4-16 4.4.3 config register programming ..................................................... 4-17
MC68HC11F1 motorola technical data v (continued) paragraph title page table of contents 4.5 chip selects ............................................................................................ 4-18 4.5.1 program chip select ....................................................................... 4-18 4.5.2 i/o chip selects .............................................................................. 4-18 4.5.3 general-purpose chip select .......................................................... 4-19 section 5 resets and interrupts 5.1 resets ....................................................................................................... 5-1 5.1.1 power-on reset ................................................................................ 5-1 5.1.2 external reset (reset ) ................................................................... 5-1 5.1.3 computer operating properly (cop) reset ...................................... 5-2 5.1.4 clock monitor reset .......................................................................... 5-2 5.1.5 option register .............................................................................. 5-3 5.1.6 config register .............................................................................. 5-4 5.2 effects of reset ......................................................................................... 5-4 5.2.1 central processing unit ..................................................................... 5-5 5.2.2 memory map ..................................................................................... 5-5 5.2.3 parallel i/o ......................................................................................... 5-5 5.2.4 timer ................................................................................................. 5-5 5.2.5 real-time interrupt (rti) .................................................................. 5-5 5.2.6 pulse accumulator ............................................................................ 5-6 5.2.7 computer operating properly (cop) ................................................ 5-6 5.2.8 serial communications interface (sci) ............................................. 5-6 5.2.9 serial peripheral interface (spi) ........................................................ 5-6 5.2.10 analog-to-digital converter ............................................................... 5-6 5.2.11 system .............................................................................................. 5-6 5.3 reset and interrupt priority ....................................................................... 5-6 5.3.1 highest priority interrupt and miscellaneous register ...................... 5-7 5.4 interrupts ................................................................................................... 5-8 5.4.1 interrupt recognition and register stacking ..................................... 5-9 5.4.2 non-maskable interrupt request (xirq ) ........................................ 5-10 5.4.3 illegal opcode trap ......................................................................... 5-10 5.4.4 software interrupt ............................................................................ 5-11 5.4.5 maskable interrupts ......................................................................... 5-11 5.4.6 reset and interrupt processing ....................................................... 5-11 5.5 low power operation .............................................................................. 5-16 5.5.1 wait ............................................................................................... 5-17 5.5.2 stop ............................................................................................... 5-17 section 6 parallel input/output 6.1 port a ........................................................................................................ 6-1
motorola MC68HC11F1 vi technical data (continued) paragraph title page table of contents 6.2 port b ........................................................................................................ 6-2 6.3 port c ........................................................................................................ 6-2 6.4 port d ........................................................................................................ 6-3 6.5 port e ........................................................................................................ 6-4 6.6 port f ......................................................................................................... 6-4 6.7 port g ........................................................................................................ 6-5 6.8 system configuration options 2 ................................................................ 6-5 section 7 serial communications interface 7.1 data format .............................................................................................. 7-1 7.2 transmit operation .................................................................................... 7-1 7.3 receive operation ..................................................................................... 7-2 7.4 wakeup feature ........................................................................................ 7-4 7.4.1 idle-line wakeup .............................................................................. 7-4 7.4.2 address-mark wakeup ...................................................................... 7-4 7.5 sci error detection ................................................................................... 7-5 7.6 sci registers ............................................................................................ 7-5 7.6.1 serial communications data register .............................................. 7-5 7.6.2 serial communications control register 1 ....................................... 7-5 7.6.3 serial communications control register 2 ....................................... 7-6 7.6.4 serial communication status register .............................................. 7-7 7.6.5 baud rate register ........................................................................... 7-8 7.7 status flags and interrupts ..................................................................... 7-10 7.7.1 receiver flags ................................................................................ 7-11 section 8 serial peripheral interface 8.1 functional description ............................................................................... 8-1 8.2 spi transfer formats ................................................................................ 8-2 8.2.1 clock phase and polarity controls .................................................... 8-3 8.3 spi signals ................................................................................................ 8-3 8.3.1 master in slave out ........................................................................... 8-4 8.3.2 master out slave in ........................................................................... 8-4 8.3.3 serial clock ....................................................................................... 8-4 8.3.4 slave select ...................................................................................... 8-4 8.4 spi system errors ..................................................................................... 8-4 8.5 spi registers ............................................................................................ 8-5 8.5.1 serial peripheral control ................................................................... 8-5 8.5.2 serial peripheral status ..................................................................... 8-7 8.5.3 serial peripheral data register ......................................................... 8-7
MC68HC11F1 motorola technical data vii (continued) paragraph title page table of contents section 9 timing system 9.1 timer structure .......................................................................................... 9-3 9.2 input capture ............................................................................................. 9-5 9.2.1 timer control register 2 ................................................................... 9-5 9.2.2 timer input capture registers .......................................................... 9-6 9.2.3 timer input capture 4/output compare 5 register .......................... 9-6 9.3 output compare ........................................................................................ 9-6 9.3.1 timer output compare registers ..................................................... 9-7 9.3.2 timer compare force register ......................................................... 9-8 9.3.3 output compare mask registers ...................................................... 9-8 9.3.4 output compare data register ......................................................... 9-9 9.3.5 timer counter register ..................................................................... 9-9 9.3.6 timer control register 1 ................................................................... 9-9 9.3.7 timer interrupt mask register 1 ...................................................... 9-10 9.3.8 timer interrupt flag register 1 ....................................................... 9-11 9.3.9 timer interrupt mask register 2 ...................................................... 9-11 9.3.10 timer interrupt flag register 2 ....................................................... 9-12 9.4 real-time interrupt ................................................................................. 9-12 9.4.1 timer interrupt mask register 2 ...................................................... 9-13 9.4.2 timer interrupt flag register 2 ....................................................... 9-14 9.4.3 pulse accumulator control register ............................................... 9-14 9.5 computer operating properly watchdog function ................................. 9-15 9.6 pulse accumulator .................................................................................. 9-15 9.6.1 pulse accumulator control register ............................................... 9-16 9.6.2 pulse accumulator count register ................................................. 9-17 9.6.3 pulse accumulator status and interrupt bits ................................... 9-18 section 10 analog-to-digital converter 10.1 overview ................................................................................................. 10-1 10.1.1 multiplexer ....................................................................................... 10-1 10.1.2 analog converter ............................................................................ 10-3 10.1.3 digital control .................................................................................. 10-3 10.1.4 result registers .............................................................................. 10-3 10.1.5 a/d converter clocks ...................................................................... 10-4 10.1.6 conversion sequence ..................................................................... 10-4 10.2 a/d converter power-up and clock select ............................................. 10-5 10.3 conversion process ................................................................................ 10-5 10.4 channel assignments ............................................................................. 10-6 10.5 single-channel operation ....................................................................... 10-6 10.6 multiple-channel operation ..................................................................... 10-6
motorola MC68HC11F1 viii technical data (continued) paragraph title page table of contents 10.7 operation in stop and wait modes .................................................... 10-7 10.8 a/d control/status registers .................................................................. 10-7 10.9 a/d converter result registers .............................................................. 10-8 appendix a electrical characteristics appendix bmechanical data and ordering information b.1 pin assignments ....................................................................................... b-1 b.2 package dimensions ................................................................................ b-2 b.3 ordering information ................................................................................ b-3 appendix cdevelopment support c.1 MC68HC11F1 development tools .......................................................... c-1 c.2 mc68hc11evs ?evaluation system .................................................... c-1 c.3 m68mmds11 ?modular development system for m68hc11 devices . c-1
MC68HC11F1 motorola technical data ix figure title page 1-1 MC68HC11F1 block diagram ........................................................................ 1-2 2-1 pin assignments for MC68HC11F1 68-pin plcc ......................................... 2-1 2-2 pin assignments for MC68HC11F1 80-pin qfp ............................................ 2-2 2-3 external reset circuit ..................................................................................... 2-3 2-4 common crystal connections ........................................................................ 2-4 2-5 external oscillator connections ..................................................................... 2-4 2-6 one crystal driving two mcus ..................................................................... 2-4 2-7 4xout signal driving a second mcu ........................................................... 2-5 3-1 programming model ....................................................................................... 3-2 3-2 stacking operations ....................................................................................... 3-4 4-1 MC68HC11F1 memory map .......................................................................... 4-3 4-2 ram standby modb/v stby connections ..................................................... 4-4 4-3 address map for i/o and program chip selects .......................................... 4-19 4-4 address map for general-purpose chip select ........................................... 4-20 5-1 processing flow out of reset (1 of 2) ......................................................... 5-12 5-2 processing flow out of reset (2 of 2) ......................................................... 5-13 5-3 interrupt priority resolution (1 of 2) ............................................................. 5-14 5-4 interrupt priority resolution (2 of 2) ............................................................. 5-15 5-5 interrupt source resolution within sci ........................................................ 5-16 7-1 sci transmitter block diagram ...................................................................... 7-2 7-2 sci receiver block diagram .......................................................................... 7-3 7-3 sci baud rate generator block diagram .................................................... 7-10 7-4 interrupt source resolution within sci ........................................................ 7-12 8-1 spi block diagram ......................................................................................... 8-2 8-2 spi transfer format ....................................................................................... 8-3 9-1 timer clock divider chains ............................................................................ 9-2 9-2 capture/compare block diagram .................................................................. 9-4 9-3 pulse accumulator ....................................................................................... 9-16 10-1 a/d converter block diagram ...................................................................... 10-2 10-2 electrical model of an a/d input pin (sample mode) ................................... 10-3 10-3 a/d conversion sequence ........................................................................... 10-4 a-1 test methods .................................................................................................. a-4 a-2 timer inputs ................................................................................................... a-5 a-3 por external reset timing diagram ............................................................. a-6 a-4 stop recovery timing diagram ................................................................... a-7 a-5 wait recovery from interrupt timing diagram ............................................. a-8 a-6 interrupt timing diagram ................................................................................ a-9 a-7 port read timing diagram ........................................................................... a-10 a-8 port write timing diagram ........................................................................... a-10 a-9 expansion bus timing .................................................................................. a-13 a-10 spi master timing (cpha = 0) .................................................................... a-15 list of illustrations
motorola MC68HC11F1 x technical data (continued) figure title page list of illustrations a-11 spi master timing (cpha = 1) .................................................................... a-15 a-12 spi slave timing (cpha = 0) ...................................................................... a-16 a-13 spi slave timing (cpha = 1) ...................................................................... a-16 b-1 MC68HC11F1 68-pin plcc .......................................................................... b-1 b-2 MC68HC11F1 80-pin quad flat pack ........................................................... b-2
MC68HC11F1 motorola technical data xi table title page 2-1 port signal functions ...................................................................................... 2-7 3-1 reset vector comparison ............................................................................... 3-5 3-2 instruction set ................................................................................................. 3-9 4-1 register and control bit assignments............................................................. 4-5 4-2 write access limited registers....................................................................... 4-7 4-3 hardware mode select summary ................................................................... 4-7 4-4 eeprom mapping ........................................................................................ 4-10 4-5 ram and register mapping .......................................................................... 4-11 4-6 eeprom block protection............................................................................ 4-14 4-7 eeprom erase mode control...................................................................... 4-17 4-8 chip select clock stretch control ................................................................. 4-20 4-9 program chip select size control................................................................. 4-21 4-10 general-purpose chip select starting address ............................................ 4-22 4-11 general-purpose chip select size control ................................................... 4-22 4-12 chip select control parameter summary ..................................................... 4-23 5-1 cop timer rate selection .............................................................................. 5-2 5-2 reset cause, operating mode, and reset vector .......................................... 5-4 5-3 highest priority interrupt selection.................................................................. 5-8 5-4 interrupt and reset vector assignments......................................................... 5-9 5-5 stacking order on entry to interrupts............................................................ 5-10 6-1 i/o port configuration...................................................................................... 6-1 7-1 baud rate prescaler selection ....................................................................... 7-8 7-2 baud rate selection........................................................................................ 7-9 8-1 spi clock rates .............................................................................................. 8-6 9-1 timer summary............................................................................................... 9-3 9-2 timer output compare configuration ........................................................... 9-10 9-3 timer prescaler selection ............................................................................. 9-12 9-4 rti rate selection ........................................................................................ 9-13 9-5 pulse accumulator timing............................................................................. 9-16 9-6 pulse accumulator edge detection control .................................................. 9-17 10-1 a/d converter channel assignments............................................................ 10-6 10-2 a/d converter channel selection ................................................................. 10-8 a-1 maximum ratings............................................................................................ a-1 a-2 thermal characteristics .................................................................................. a-2 a-3 dc electrical characteristics........................................................................... a-3 a-4 control timing ................................................................................................. a-5 a-5 peripheral port timing................................................................................... a-10 a-6 analog-to-digital converter characteristics ................................................. a-11 a-7 expansion bus timing................................................................................... a-12 a-8 serial peripheral interface timing ................................................................. a-14 a-9 eeprom characteristics .............................................................................. a-17 list of tables
motorola MC68HC11F1 xii technical data (continued) table title page list of tables b-1 device ordering information ........................................................................... b-3 c-1 MC68HC11F1 development tools .................................................................c-1
MC68HC11F1 introduction motorola technical data 1-1 section 1introduction the MC68HC11F1 high-performance microcontroller unit (mcu) is an enhanced de- rivative of the m68hc11 family of microcontrollers and includes many advanced fea- tures. this mcu, with a nonmultiplexed expanded bus, is characterized by high speed and low power consumption. the fully static design allows operation at frequencies from 4 mhz to dc. 1.1 features ?m68hc11 central processing unit (cpu) ?power saving stop and wait modes ?512 bytes electrically erasable programmable read-only memory (eeprom) ?1024 bytes ram, data retained during standby ?nonmultiplexed address and data buses ?enhanced 16-bit timer ?three input capture (ic) channels ?four output compare (oc) channels ?one additional channel, selectable as fourth ic or fifth oc ?8-bit pulse accumulator ?real-time interrupt circuit ?computer operating properly (cop) watchdog ?enhanced asynchronous nonreturn to zero (nrz) serial communications inter- face (sci) ?enhanced synchronous serial peripheral interface (spi) ?eight-channel 8-bit analog-to-digital (a/d) converter ?four chip-select signal outputs with programmable clock stretching ?two i/o chip selects ?one program chip select ?one general-purpose chip select ?available in 68-pin plastic leaded chip carrier (plcc) and 80-pin plastic quad flat pack (qfp)
motorola introduction MC68HC11F1 1-2 technical data figure 1-1 MC68HC11F1 block diagram cop periodic spi sci chip selects an0 port e an1 an2 an3 an4 an5 an6 an7 a/d converter mode control timer system cpu v rl v rh pe0 pe1 pe2 pe3 pe4 pe5 pe6 pe7 port g ddr port g pg0 pg1 pg2 pg3 pg4 pg5 pg6 pg7 pd0 pd1 pd2 pd3 pd4 pd5 csio2 csio1 csgen csprog port d ddr port d miso mosi sck ss rxd txd modb/ moda/ 512 bytes eeprom 1024 bytes ram interrupt pulse accumulator pa0 port a ddr pa1 pa2 pa3 pa4 pa5 pa6 pa7 ic3 ic2 ic1 oc5/ic4/oc1 oc4/oc1 oc3/oc1 oc2/oc1 pai/oc1 oscillator interrupt logic clock logic pc0 port c ddr pc1 pc2 pc3 pc4 pc5 pc6 pc7 data0 data1 data2 data3 data4 data5 data6 data7 port c pf0 port f pf1 pf2 pf3 pf4 pf5 pf6 pf7 addr0 addr1 addr2 addr3 addr4 addr5 addr6 addr7 pb0 port b pb1 pb2 pb3 pb4 pb5 pb6 pb7 addr8 addr9 addr10 addr11 addr12 addr13 addr14 addr15 port a r/w xirq irq reset xtal extal e 4xout lir v stby address bus data bus v dd v ss v rh v rl r/w
MC68HC11F1 pin descriptions motorola technical data 2-1 section 2 pin descriptions the MC68HC11F1 mcu is available in a 68-pin plastic leaded chip carrier (plcc) and an 80-pin plastic quad flat pack (qfp). most pins on this mcu serve two or more func- tions, as described in the following paragraphs. figure 2-1 shows the pin assignments for the plcc. figure 2-2 shows the pin assignments for the qfp. figure 2-1 pin assignments for MC68HC11F1 68-pin plcc pg3 pg2 pg1 reset pc7/data7 pc6/data6 pc5/data5 pc4/data4 pc3/data3 pc2/data2 pc1/data1 irq xirq pg7/csprog pg6/csgen pg5/csio1 pg4/csio2 pb3/addr11 pb0/addr8 pb1/addr9 pb2/addr10 pb4/addr12 pb5/addr13 pb6/addr14 pe4/an4 pe0/an0 pf0/addr0 pf1/addr1 pf2/addr2 pf3/addr3 pf4/addr4 pf5/addr5 pf6/addr6 pf7/addr7 e modb/v stby moda/lir pc0/data0 extal xtal v ss r/w 4xout pe7/an7 pe3/an3 pe6/an6 pe2/an2 pe5/an5 pe1/an1 v rh v rl pg0 pd3/mosi pd0/rxd pd4/sck pd2/miso pd1/txd pd5/ss pb7/addr15 pa4/oc4/oc1 pa5/oc3/oc1 pa6/oc2/oc1 pa7/pai/oc1 v dd pa3/oc5/ic4/oc1 pa2/ic1 pa1/ic2 pa0/ic3 23 24 10 11 12 13 14 15 16 17 18 45 59 58 57 56 55 54 53 52 51 50 19 20 21 22 49 48 47 46 25 60 6 5 4 3 2 67 68 65 64 63 62 8 7 66 9 34 35 36 37 38 39 27 28 29 30 31 32 33 40 41 42 61 44 26 43 1 MC68HC11F1
motorola pin descriptions MC68HC11F1 2-2 technical data figure 2-2 pin assignments for MC68HC11F1 80-pin qfp 2.1 v dd and v ss power is supplied to the mcu through v dd and v ss . v dd is the power supply, and v ss is ground. the mcu operates from a single 5-volt (nominal) power supply. very fast signal transitions occur on the mcu pins. the short rise and fall times place high, short duration current demands on the power supply. to prevent noise problems, pro- vide good power-supply bypassing at the mcu. also, use bypass capacitors that have good high-frequency characteristics and situate them as close to the mcu as possible. bypass requirements vary, depending on how heavily the mcu pins are loaded. pa3/oc5/ic4/oc1 pa5/oc3/oc1 pa4/oc4/oc1 nc pa1/ic2 pa0/ic3 v dd pa2/ic1 pb7/addr15 pd5/ss pd4/sck pd3/mosi pd2/miso pd1/txd 14 15 1 2 3 4 5 6 7 8 9 45 59 58 57 56 55 54 53 52 51 50 10 11 12 13 49 48 47 46 16 60 pf2/addr2 pf1/addr1 pb1/addr9 pb2/addr10 pb3/addr11 pb4/addr12 pb5/addr13 pb6/addr14 nc nc pf7/addr7 pb0/addr8 pf6/addr6 pf3/addr3 pc5/data5 pc7/data7 pc6/data6 pc4/data4 pc3/data3 nc pg1 pg2 pg3 pg4/csio2 pg5/csio1 pg6/csgen pg7/csprog 77 76 75 74 73 70 71 68 67 66 65 79 78 69 28 29 30 31 32 33 21 22 23 24 25 26 27 34 35 36 nc pe2/an2 nc pe6/an6 pe5/an5 pe1/an1 v ss v rh moda/lir e r/w extal 64 44 pc2/data2 pf0/addr0 17 xtal 37 nc 72 63 62 61 pd0/rxd pg0 nc pc0/data0 nc 4xout 38 39 40 pe0/an0 pe4/an4 nc 18 19 20 pc1/data1 nc 43 42 41 80 MC68HC11F1 pa6/oc2/oc1 pa7/pai/oc1 v rl modb/v stby pe7/an7 pe3/an3 pf5/addr5 pf4/addr4 irq xirq reset nc
MC68HC11F1 pin descriptions motorola technical data 2-3 2.2 reset (reset ) an active low bidirectional control signal, reset , acts as an input to initialize the mcu to a known start-up state. it also acts as an open-drain output to indicate that an inter- nal failure has been detected in either the clock monitor or cop watchdog circuit. the cpu distinguishes between internal and external reset conditions by sensing whether the reset pin rises to a logic one in less than two e-clock cycles after a reset has oc- curred. it is not advisable to connect an external resistor-capacitor (rc) power-up de- lay circuit to the reset pin of m68hc11 devices because the circuit charge time constant can cause the device to misinterpret the type of reset that occurred. refer to section 5 resets and interrupts for further information. figure 2-3 illustrates a reset circuit that uses an external switch. other circuits can be used, however, it is important to incorporate a low voltage interrupt (lvi) circuit to pre- vent operation at insufficient voltage levels which could result in erratic behavior or cor- ruption of ram. figure 2-3 external reset circuit 2.3 e-clock output (e) e is the output connection for the internally generated e clock. the signal from e is used as a timing reference. the frequency of the e-clock output is one fourth that of the input frequency at the extal pin. when e-clock output is low, an internal process is taking place. when it is high, data is being accessed. all clocks, including the e clock, are halted when the mcu is in stop mode. the e clock can be turned off in single-chip modes to reduce the effects of radio frequency interference (rfi). refer to section 9 timing system . 2.4 crystal driver and external clock input (xtal, extal) these two pins provide the interface for either a crystal or a cmos-compatible clock to control the internal clock generator circuitry. either a crystal oscillator or a cmos compatible clock can be used. the resulting e-clock rate is the input frequency divided by four. manual reset switch 4.7 k w to reset of m68hc11 4.7 k w v dd v dd mc34064 in gnd 2 3 1 reset 1.0 m f 4.7 k w v dd mc34164 in gnd 2 3 1 reset optional power-on delay and manual reset switch
motorola pin descriptions MC68HC11F1 2-4 technical data the xtal pin is normally left unterminated when an external cmos compatible clock is connected to the extal pin. however, a 10 k w to 100 k w load resistor connected from the xtal output to ground can be used to reduce rfi noise emission. the xtal output is normally used to drive a crystal. the xtal output can be buffered with a high-impedance buffer, or it can be used to drive the extal input of another m68hc11 device. refer to figure 2-6 . in all cases, use caution when designing circuitry associated with the oscillator pins. load capacitances shown in the oscillator circuits include all stray layout capacitanc- es. refer to figure 2-4 , figure 2-5 , and figure 2-6 . figure 2-4 common crystal connections figure 2-5 external oscillator connections figure 2-6 one crystal driving two mcus extal xtal 25 pf * values include all stray capacitances. * 25 pf * 10m 4 x e crystal mcu nc or 10 k ?100 k load xtal extal mcu cmos-compatible external oscillator extal xtal 25 pf * values include all stray capacitances. * 25 pf * 10m 4 x e crystal nc or 10 k ?100 k load xtal extal second 220 mcu first mcu
MC68HC11F1 pin descriptions motorola technical data 2-5 2.5 four times e-clock frequency output (4xout) although the circuit shown in figure 2-6 will work for any m68hc11 mcu, the MC68HC11F1 has an additional clock output that is four times the e-clock frequency. this output (4xout) can be used to directly drive the extal input of another m68hc11 mcu. refer to figure 2-7 . the 4xout output is enabled after reset and can be disabled by clearing the clk4x bit in the opt2 register. figure 2-7 4xout signal driving a second mcu 2.6 interrupt request (irq ) the irq input provides a means of generating asynchronous interrupt requests for the cpu. either falling-edge triggering or low-level triggering is selected by the irqe bit in the option register. irq is always configured for level-sensitive triggering at reset. connect an external pull-up resistor, typically 4.7 k w , to v dd when irq is used in a level-sensitive wired-or configuration. refer to section 5 resets and inter- rupts . 2.7 non-maskable interrupt (xirq ) the xirq input provides a means of requesting a non-maskable interrupt after reset initialization. during reset, the x bit in the condition code register (ccr) is set and any interrupt is masked until mcu software enables it. because the xirq input is level sensitive, it can be connected to a multiple-source wired-or network with an external pull-up resistor to v dd . xirq is often used as a power loss detect interrupt. whenever xirq or irq are used with multiple interrupt sources (irq must be config- ured for level-sensitive operation if there is more than one source of irq interrupt), each source must drive the interrupt input with an open-drain type of driver to avoid contention between outputs. there should be a single pull-up resistor near the mcu interrupt input pin (typically 4.7 k w ). there must also be an interlock mechanism at each interrupt source so that the source holds the interrupt line low until the mcu rec- ognizes and acknowledges the interrupt request. if one or more interrupt sources are still pending after the mcu services a request, the interrupt line will still be held low and the mcu will be interrupted again as soon as the interrupt mask bit in the condition code register (ccr) is cleared (normally upon return from an interrupt). refer to sec- tion 5 resets and interrupts . extal 4xout MC68HC11F1 nc or 10 k ?100 k load xtal extal second xtal mcu oscillator circuit or cmos-compatible clock
motorola pin descriptions MC68HC11F1 2-6 technical data 2.8 moda and modb (moda/lir and modb/v stby ) during reset, moda and modb select one of the four operating modes. refer to sec- tion 4 operating modes and on-chip memory . after the operating mode has been selected, the lir pin provides an open-drain output to indicate that execution of an instruction has begun. the lir pin is configured for wired-or operation (only pulls low). a series of e-clock cycles occurs during execution of each instruction. the lir signal is asserted (drives low) during the first e-clock cycle of each instruction (opcode fetch). this output is provided for assistance in program debugging. the v stby pin is used to input ram standby power. the mcu is powered from the v dd signal unless the difference between the level of v stby and v dd is greater than one mos threshold (about 0.7 volts). when these voltages differ by more than 0.7 volts, the internal 768-byte ram and part of the reset logic are powered from v stby rather than v dd . this allows ram contents to be retained without v dd power applied to the mcu. reset must be driven low before v dd is removed and must remain low until v dd has been restored to a valid level. 2.9 v rh and v rl these pins provide the reference voltage for the analog-to-digital converter. bypass capacitors should be used to minimize noise on these signals. any noise on v rh and v rl will directly affect a/d accuracy. 2.10 r/w in expanded and test modes, r/w indicates the direction of transfers on the external data bus. a logic level one on this pin indicates that a read cycle is in progress. a logic zero on this pin indicates that a write cycle is in progress and that no external device should drive the data bus. the e-clock can be used to enable external devices to drive data onto the data bus during the second half of a read bus cycle (e clock high). r/w can then be used to control the direction of data transfers. r/w drives low when data is being written to the external data bus. r/w will remain low during consecutive data bus write cycles, such as when a double-byte store occurs. 2.11 port signals for the MC68HC11F1, 54 pins are arranged into six 8-bit ports: a, b, c, e, f, and g, and one 6-bit port (d). each of these seven ports serves a purpose other than i/o, de- pending on the operating mode or peripheral functions selected. note that ports b, c, and f are available for i/o functions only in single-chip and bootstrap modes. the pins of ports a, c, d, and g are fully bidirectional. ports b and f are output-only ports. port e is an input-only port. refer to table 2-1 for details about the 54 port signals?func- tions within different operating modes.
MC68HC11F1 pin descriptions motorola technical data 2-7 2.11.1 port a port a is an 8-bit general-purpose i/o port with a data register (porta) and a data direction register (ddra). port a pins share functions with the 16-bit timer system. porta can be read at any time. inputs return the pin level; outputs return the pin driv- er input level. if written, porta stores the data in internal latches. it drives the pins only if they are configured as outputs. writes to porta do not change the pin state when the pins are configured for timer output compares. out of reset, port a pins [7:0] are general-purpose high-impedance inputs. when the timer functions associated with these pins are disabled, the bits in ddra govern the i/o state of the associated pin. for further information, refer to section 6 paral- lel input/output . note when using the information about port functions, do not confuse pin function with the electrical state of the pin at reset. all general-pur- pose i/o pins configured as inputs at reset are in a high-impedance state. port data registers reflect the logic state of the port at reset. the pin function is mode dependent. table 2-1 port signal functions port/bit single-chip and bootstrap mode expanded and special test mode pa0 pa0/ic3 pa1 pa1/ic2 pa2 pa2/ic1 pa3 pa3/oc5/ic4/oc1 pa4 pa4/oc4/oc1 pa5 pa5/oc3/oc1 pa6 pa6/oc2/oc1 pa7 pa7/pai/oc1 pb[7:0] pb[7:0] addr[15:8] pc[7:0] pc[7:0] data[7:0] pd0 pd0/rxd pd1 pd1/txd pd2 pd2/miso pd3 pd3/mosi pd4 pd4/sck pd5 pd5/ss pe[7:0] pe[7:0]/an[7:0] pf[7:0] pf[7:0] addr[7:0] pg0 pg0 pg1 pg1 pg2 pg2 pg3 pg3 pg4 pg4 pg4/csio2 pg5 pg5 pg5/csio1 pg6 pg6 pg6/csgen pg7 pg7 pg7/csprog
motorola pin descriptions MC68HC11F1 2-8 technical data 2.11.2 port b port b is an 8-bit output-only port. in single-chip modes, port b pins are general-pur- pose output pins (pb[7:0]). in expanded modes, port b pins act as the high-order ad- dress lines (addr[15:8]) of the address bus. portb can be read at any time. reads of portb return the pin driver input level. if portb is written, the data is stored in internal latches. it drives the pins only in single- chip or bootstrap mode. in expanded operating modes, port b pins are the high-order address outputs (addr[15:8]). refer to section 6 parallel input/output . 2.11.3 port c port c is an 8-bit general-purpose i/o port with a data register (portc) and a data direction register (ddrc). in single-chip modes, port c pins are general-purpose i/o pins (pc[7:0]). in expanded modes, port c pins are configured as data bus pins (da- ta[7:0]). portc can be read at any time. inputs return the pin level; outputs return the pin driv- er input level. if portc is written, the data is stored in internal latches. it drives the pins only if they are configured as outputs in single-chip or bootstrap mode. port c pins are general-purpose inputs out of reset in single-chip and bootstrap modes. in expand- ed and test modes, these pins are data bus lines out of reset. the cwom control bit in the opt2 register disables port c? p-channel output drivers. because the n-channel driver is not affected by cwom, setting cwom causes port c to become an open-drain-type output port suitable for wired-or operation. in wired- or mode, (portc bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port c bit is at logic level one, the associated pin is in a high- impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port c can only be configured for wired-or operation when the mcu is in sin- gle-chip or bootstrap modes. refer to section 6 parallel input/output . 2.11.4 port d port d, a 6-bit general-purpose i/o port, has a data register (portd) and a data di- rection register (ddrd). the six port d lines (d[5:0]) can be used for general-purpose i/o, for the serial communications interface (sci) and serial peripheral interface (spi) subsystems. portd can be read at any time. inputs return the pin level; outputs return the pin driv- er input level. if portd is written, the data is stored in internal latches and can be driv- en only if port d is configured for general-purpose output. the dwom control bit in the spcr register disables port d? p-channel output drivers. because the n-channel driver is not affected by dwom, setting dwom causes port d to become an open-drain-type output port suitable for wired-or operation. in wired-
MC68HC11F1 pin descriptions motorola technical data 2-9 or mode, (portd bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port d bit is at logic level one, the associated pin is in a high- impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port d can be configured for wired-or operation in any operating mode. refer to section 6 parallel input/output , section 7 serial communi- cations interface , and section 8 serial peripheral interface . 2.11.5 port e port e is an 8-bit input-only port that is also used as the analog input port for the ana- log-to-digital converter. port e pins that are not used for the a/d system can be used as general-purpose inputs. however, porte should not be read during the sample portion of an a/d conversion sequence. refer to section 10 analog-to-digital converter . 2.11.6 port f port f is an 8-bit output-only port. in single-chip mode, port f pins are general-purpose output pins (pf[7:0]). in expanded mode, port f pins act as the low-order address out- puts (addr[7:0]). portf can be read at any time. reads of portf return the pin driver input level. if portf is written, the data is stored in internal latches. it drives the pins only in single- chip or bootstrap mode. in expanded operating modes, port f pins are the low-order address outputs (addr[7:0]). refer to section 6 parallel input/output . 2.11.7 port g port g is an 8-bit general-purpose i/o port. when enabled, four chip select signals are alternate functions of port g bits [7:4]. portg can be read at any time. inputs return the pin level; outputs return the pin driv- er input level. if portg is written, the data is stored in internal latches. it drives the pins only if they are configured as outputs. the gwom control bit in the opt2 register disables port g's p-channel output drivers. because the n-channel driver is not affected by gwom, setting gwom causes port g to become an open-drain-type output port suitable for wired-or operation. in wired- or mode, (portg bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port g bit is at logic level one, the associated pin is in a high- impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port g can be configured for wired-or operation in any operating mode. refer to section 6 parallel input/output and section 4 operating modes and on-chip memory .
motorola pin descriptions MC68HC11F1 2-10 technical data
MC68HC11F1 central processing unit motorola technical data 3-1 section 3 central processing unit this section presents information on m68hc11 central processing unit (cpu) archi- tecture. data types, addressing modes, the instruction set, and the extended address- ing range required to support this mcu? memory expansion feature are also included, as are special operations such as subroutine calls and interrupts. the cpu is designed to treat all peripheral, i/o, and memory locations identically as addresses in the 64 kbyte memory map. this is referred to as memory-mapped i/o. there are no special instructions for i/o that are separate from those used for memory. this architecture also allows accessing an operand from an external memory location with no execution-time penalty. 3.1 cpu registers m68hc11 cpu registers are an integral part of the cpu and are not addressed as if they were memory locations. the seven registers, discussed in the following para- graphs, are shown in figure 3-1 .
motorola central processing unit MC68HC11F1 3-2 technical data figure 3-1 programming model 3.1.1 accumulators a, b, and d accumulators a and b are general-purpose 8-bit registers that hold operands and re- sults of arithmetic calculations or data manipulations. for some instructions, these two accumulators are treated as a single double-byte (16-bit) accumulator called accumu- lator d. although most instructions can use accumulators a or b interchangeably, the following exceptions apply: the abx and aby instructions add the contents of 8-bit accumulator b to the contents of 16-bit register x or y, but there are no equivalent instructions that use a instead of b. the tap and tpa instructions transfer data from accumulator a to the condition code register, or from the condition code register to accumulator a, however, there are no equivalent instructions that use b rather than a. the decimal adjust accumulator a (daa) instruction is used after binary-coded deci- mal (bcd) arithmetic operations, but there is no equivalent bcd instruction to adjust accumulator b. carry overflow zero negative i interrupt mask half-carry (from bit 3) x interrupt mask stop disable ccr pc sp iy ix d s program counter stack pointer index register y index register x double accumulator d accumulator b condition code register x h i n z v c 70 70 0 15 0 15 0 15 0 15 0 15 70 accumulator a 1 2 3 4 5 6 b a
MC68HC11F1 central processing unit motorola technical data 3-3 the add, subtract, and compare instructions associated with both a and b (aba, sba, and cba) only operate in one direction, making it important to plan ahead to ensure that the correct operand is in the correct accumulator. 3.1.2 index register x (ix) the ix register provides a 16-bit indexing value that can be added to the 8-bit offset provided in an instruction to create an effective address. the ix register can also be used as a counter or as a temporary storage register. 3.1.3 index register y (iy) the 16-bit iy register performs an indexed mode function similar to that of the ix reg- ister. however, most instructions using the iy register require an extra byte of machine code and an extra cycle of execution time because of the way the opcode map is im- plemented. refer to 3.3 opcodes and operands for further information. 3.1.4 stack pointer (sp) the m68hc11 cpu has an automatic program stack. this stack can be located any- where in the address space and can be any size up to the amount of memory available in the system. normally the sp is initialized by one of the first instructions in an appli- cation program. the stack is configured as a data structure that grows downward from high memory to low memory. each time a new byte is pushed onto the stack, the sp is decremented. each time a byte is pulled from the stack, the sp is incremented. at any given time, the sp holds the 16-bit address of the next free location in the stack. figure 3-2 is a summary of sp operations.
motorola central processing unit MC68HC11F1 3-4 technical data figure 3-2 stacking operations when a subroutine is called by a jump to subroutine (jsr) or branch to subroutine (bsr) instruction, the address of the instruction after the jsr or bsr is automatically pushed onto the stack, least significant byte first. when the subroutine is finished, a return from subroutine (rts) instruction is executed. the rts pulls the previously stacked return address from the stack, and loads it into the program counter. execu- tion then continues at this recovered return address. sp-9 stack sp-1 acmltr a acmltr b condition code sp-2 sp-3 sp-4 sp-5 sp-6 sp-7 sp-8 index register (y l ) index register (y h ) index register (x l ) index register (x h ) rtn h rtn l stack sp-2 sp-1 sp rtn h rtn l stack sp-2 sp-1 sp rtn h rtn l $9d = jsr dd next main instr direct main program $ad = jsr ff next main instr indxd,x main program pc rtn pc rtn $18 = pre ff next main instr indxd,y main program pc rtn $ad = jsr $bd = jsr ll next main instr extend main program pc rtn hh $8d = bsr rr next main instr main program $39 = rts subroutine pc rtn pc bsr, branch to subroutine stack sp sp+1 sp+2 rts, return from subroutine $3f = swi main program pc swi, software interrupt rtn $3e = wai main program pc wai, wait for interrupt rtn $3b = rti interrupt program pc stack sp+1 sp rti, return from interrupt acmltr a acmltr b condition code sp+2 sp+3 sp+4 sp+5 sp+6 sp+7 sp+8 sp+9 legend: rtn rtn h rtn l dd ff hh ll rr address of next instruction in main program to be executed upon return from subroutine. most significant byte of return address. least significant byte of return address. 8-bit direct address ($0000-$00ff) (high byte assumed to be $00). 8-bit positive offset $00 (0) to $ff (256) is added to index. high-order byte of 16-bit extended address. low-order byte of 16-bit extended address. signed-relative offset $80 (-128) to $7f (+127) (offset relative to the address following the machine code offset byte). jsr, jump to subroutine shaded cells show stack pointer position after operation is complete. rtn h rtn l index register (y l ) index register (y h ) index register (x l ) index register (x h ) rtn h rtn l sp
MC68HC11F1 central processing unit motorola technical data 3-5 when an interrupt is recognized, the current instruction finishes normally, the return address (the current value in the program counter) is pushed onto the stack, all of the cpu registers are pushed onto the stack, and execution continues at the address specified by the vector for the interrupt. at the end of the interrupt service routine, an rti instruction is executed. the rti instruction causes the saved registers to be pulled off the stack in reverse order. program execution resumes at the return address. there are instructions that push and pull the a and b accumulators and the x and y index registers. these instructions are often used to preserve program context. for example, pushing accumulator a onto the stack when entering a subroutine that uses accumulator a, and then pulling accumulator a off the stack just before leaving the subroutine, ensures that the contents of a register will be the same after returning from the subroutine as it was before starting the subroutine. 3.1.5 program counter (pc) the program counter, a 16-bit register, contains the address of the next instruction to be executed. after reset, the program counter is initialized from one of six possible vectors, depending on operating mode and the cause of reset. 3.1.6 condition code register (ccr) this 8-bit register contains five condition code indicators (c, v, z, n, and h), two inter- rupt masking bits, (i and x) and a stop disable bit (s). in the m68hc11 cpu, condition codes are automatically updated by most instructions. for example, load accumulator a (ldaa) and store accumulator a (staa) instructions automatically set or clear the n, z, and v condition code flags. pushes, pulls, add b to x (abx), add b to y (aby), and transfer/exchange instructions do not affect the condition codes. refer to table 3-2 , which shows what condition codes are affected by a particular instruction. 3.1.6.1 carry/borrow (c) the c bit is set if the arithmetic logic unit (alu) performs a carry or borrow during an arithmetic operation. the c bit also acts as an error flag for multiply and divide opera- tions. shift and rotate instructions operate with and through the carry bit to facilitate multiple-word shift operations. 3.1.6.2 overflow (v) the overflow bit is set if an operation causes an arithmetic overflow. otherwise, the v bit is cleared. table 3-1 reset vector comparison por or reset pin clock monitor cop watchdog normal $fffe, f $fffc, d $fffa, b test or boot $bffe, f $bffc, d $bffa, b
motorola central processing unit MC68HC11F1 3-6 technical data 3.1.6.3 zero (z) the z bit is set if the result of an arithmetic, logic, or data manipulation operation is zero. otherwise, the z bit is cleared. compare instructions do an internal implied sub- traction and the condition codes, including z, reflect the results of that subtraction. a few operations (inx, dex, iny, and dey) affect the z bit and no other condition flags. for these operations, only = and - conditions can be determined. 3.1.6.4 negative (n) the n bit is set if the result of an arithmetic, logic, or data manipulation operation is negative (msb = 1). otherwise, the n bit is cleared. a result is said to be negative if its most significant bit (msb) is a one. a quick way to test whether the contents of a memory location has the msb set is to load it into an accumulator and then check the status of the n bit. 3.1.6.5 interrupt mask (i) the interrupt request (irq) mask (i bit) is a global mask that disables all maskable in- terrupt sources. while the i bit is set, interrupts can become pending, but the operation of the cpu continues uninterrupted until the i bit is cleared. after any reset, the i bit is set by default and can only be cleared by a software instruction. when an interrupt is recognized, the i bit is set after the registers are stacked, but before the interrupt vector is fetched. after the interrupt has been serviced, a return from interrupt instruction is normally executed, restoring the registers to the values that were present before the interrupt occurred. normally, the i bit is zero after a return from interrupt is executed. although the i bit can be cleared within an interrupt service routine, ?esting?interrupts in this way should only be done when there is a clear understanding of latency and of the arbitration mechanism. refer to section 5 resets and interrupts . 3.1.6.6 half carry (h) the h bit is set when a carry occurs between bits 3 and 4 of the arithmetic logic unit during an add, aba, or adc instruction. otherwise, the h bit is cleared. half carry is used during bcd operations. 3.1.6.7 x interrupt mask (x) the xirq mask (x) bit disables interrupts from the xirq pin. after any reset, x is set by default and must be cleared by a software instruction. when an xirq interrupt is recognized, the x and i bits are set after the registers are stacked, but before the in- terrupt vector is fetched. after the interrupt has been serviced, an rti instruction is normally executed, causing the registers to be restored to the values that were present before the interrupt occurred. the x interrupt mask bit is set only by hardware (reset or xirq acknowledge). x is cleared only by program instruction (tap, where the as- sociated bit of a is zero; or rti, where bit 6 of the value loaded into the ccr from the stack has been cleared). there is no hardware action for clearing x.
MC68HC11F1 central processing unit motorola technical data 3-7 3.1.6.8 stop disable (s) setting the stop disable (s) bit prevents the stop instruction from putting the m68hc11 into a low-power stop condition. if the cpu encounters a stop instruction while the s bit is set, it is treated as a no-operation (nop) instruction, and processing continues to the next instruction. s is set by reset ?stop disabled by default. 3.2 data types the m68hc11 cpu supports the following data types: ?bit data ?8-bit and 16-bit signed and unsigned integers ?16-bit unsigned fractions ?16-bit addresses a byte is eight bits wide and can be accessed at any byte location. a word is composed of two consecutive bytes with the most significant byte at the lower value address. be- cause the m68hc11 is an 8-bit cpu, there are no special requirements for alignment of instructions or operands. 3.3 opcodes and operands the m68hc11 family of microcontrollers uses 8-bit opcodes. each opcode identifies a particular instruction and associated addressing mode to the cpu. several opcodes are required to provide each instruction with a range of addressing capabilities. only 256 opcodes would be available if the range of values were restricted to the number able to be expressed in 8-bit binary numbers. a four-page opcode map has been implemented to expand the number of instructions. an additional byte, called a prebyte, directs the processor from page 0 of the opcode map to one of the other three pages. as its name implies, the additional byte precedes the opcode. a complete instruction consists of a prebyte, if any, an opcode, and zero, one, two, or three operands. the operands contain information the cpu needs for executing the instruction. complete instructions can be from one to five bytes long. 3.4 addressing modes six addressing modes can be used to access memory: immediate, direct, extended, indexed, inherent, and relative. these modes are detailed in the following paragraphs. all modes except inherent mode use an effective address. the effective address is the memory address from which the argument is fetched or stored, or the address from which execution is to proceed. the effective address can be specified within an in- struction, or it can be calculated. 3.4.1 immediate in the immediate addressing mode an argument is contained in the byte(s) immediate- ly following the opcode. the number of bytes following the opcode matches the size of the register or memory location being operated on. there are two-, three-, and four-
motorola central processing unit MC68HC11F1 3-8 technical data (if prebyte is required) byte immediate instructions. the effective address is the ad- dress of the byte following the instruction. 3.4.2 direct in the direct addressing mode, the low-order byte of the operand address is contained in a single byte following the opcode, and the high-order byte of the address is as- sumed to be $00. addresses $00?ff are thus accessed directly, using two-byte in- structions. execution time is reduced by eliminating the additional memory access required for the high-order address byte. in most applications, this 256-byte area is re- served for frequently referenced data. in m68hc11 mcus, the memory map can be configured for combinations of internal registers, ram, or external memory to occupy these addresses. 3.4.3 extended in the extended addressing mode, the effective address of the argument is contained in two bytes following the opcode byte. these are three-byte instructions (or four-byte instructions if a prebyte is required). one or two bytes are needed for the opcode and two for the effective address. 3.4.4 indexed in the indexed addressing mode, an 8-bit unsigned offset contained in the instruction is added to the value contained in an index register (ix or iy). the sum is the effective address. this addressing mode allows referencing any memory location in the 64 kbyte address space. these are two- to five-byte instructions, depending on whether or not a prebyte is required. 3.4.5 inherent in the inherent addressing mode, all the information necessary to execute the instruc- tion is contained in the opcode. operations that use only the index registers or accu- mulators, as well as control instructions with no arguments, are included in this addressing mode. these are one- or two-byte instructions. 3.4.6 relative the relative addressing mode is used only for branch instructions. if the branch con- dition is true, an 8-bit signed offset included in the instruction is added to the contents of the program counter to form the effective branch address. otherwise, control pro- ceeds to the next instruction. these are usually two-byte instructions. 3.5 instruction set refer to table 3-2 , which shows all the m68hc11 instructions in all possible address- ing modes. for each instruction, the table shows the operand construction, the num- ber of machine code bytes, and execution time in cpu e clock cycles.
MC68HC11F1 central processing unit motorola technical data 3-9 table 3-2 instruction set (sheet 1 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c aba add accumulators a + b t a inh 1b 2 d dddd abx add b to x ix + (00 : b) t ix inh 3a 3 aby add b to y iy + (00 : b) t iy inh 18 3a 4 adca (opr) add with carry to a a + m + c t a a imm a dir a ext a ind,x a ind,y 89 99 b9 a9 18 a9 ii dd hh ll ff ff 2 3 4 4 5 d dddd adcb (opr) add with carry to b b + m + c t b b imm b dir b ext b ind,x b ind,y c9 d9 f9 e9 18 e9 ii dd hh ll ff ff 2 3 4 4 5 d dddd adda (opr) add memory to a a + m t a a imm a dir a ext a ind,x a ind,y 8b 9b bb ab 18 ab ii dd hh ll ff ff 2 3 4 4 5 d dddd addb (opr) add memory to b b + m t b b imm b dir b ext b ind,x b ind,y cb db fb eb 18 eb ii dd hh ll ff ff 2 3 4 4 5 d dddd addd (opr) add 16-bit to d d + (m : m + 1) t d imm dir ext ind,x ind,y c3 d3 f3 e3 18 e3 jj kk dd hh ll ff ff 4 5 6 6 7 dddd anda (opr) and a with memory a ?m t a a imm a dir a ext a ind,x a ind,y 84 94 b4 a4 18 a4 ii dd hh ll ff ff 2 3 4 4 5 dd 0 andb (opr) and b with memory b ?m t b b imm b dir b ext b ind,x b ind,y c4 d4 f4 e4 18 e4 ii dd hh ll ff ff 2 3 4 4 5 dd 0 asl (opr) arithmetic shift left ext ind,x ind,y 78 68 18 68 hh ll ff ff 6 6 7 dddd asla arithmetic shift left a a inh 48 2 dddd aslb arithmetic shift left b b inh 58 2 dddd asld arithmetic shift left d inh 05 3 dddd asr arithmetic shift right ext ind,x ind,y 77 67 18 67 hh ll ff ff 6 6 7 dddd asra arithmetic shift right a a inh 47 2 dddd asrb arithmetic shift right b b inh 57 2 dddd bcc (rel) branch if carry clear ? c = 0 rel 24rr 3 bclr (opr) (msk) clear bit(s) m ?(mm) t m dir ind,x ind,y 15 1d 18 1d dd mm ff mm ff mm 6 7 8 dd 0 bcs (rel) branch if carry set ? c = 1 rel 25rr 3 beq (rel) branch if = zero ? z = 1 rel 27rr 3 bge (rel) branch if d zero ? n ? v = 0 rel 2crr 3 c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 a b b7 b0 c b7 b0 c b7 b0 c b7 b0
motorola central processing unit MC68HC11F1 3-10 technical data bgt (rel) branch if > zero ? z + (n ? v) = 0 rel 2err 3 bhi (rel) branch if higher ? c + z = 0 rel 22rr 3 bhs (rel) branch if higher or same ? c = 0 rel 24rr 3 bita (opr) bit(s) test a with memory a ?m a imm a dir a ext a ind,x a ind,y 85 95 b5 a5 18 a5 ii dd hh ll ff ff 2 3 4 4 5 dd 0 bitb (opr) bit(s) test b with memory b ?m b imm b dir b ext b ind,x b ind,y c5 d5 f5 e5 18 e5 ii dd hh ll ff ff 2 3 4 4 5 dd 0 ble (rel) branch if d zero ? z + (n ? v) = 1 rel 2frr 3 blo (rel) branch if lower ? c = 1 rel 25rr 3 bls (rel) branch if lower or same ? c + z = 1 rel 23rr 3 blt (rel) branch if < zero ? n ? v = 1 rel 2drr 3 bmi (rel) branch if minus ? n = 1 rel 2brr 3 bne (rel) branch if not = zero ? z = 0 rel 26rr 3 bpl (rel) branch if plus ? n = 0 rel 2a rr 3 bra (rel) branch always ? 1 = 1 rel 20 rr 3 brclr(opr) (msk) (rel) branch if bit(s) clear ? m ?mm = 0 dir ind,x ind,y 13 1f 18 1f dd mm rr ff mm rr ff mm rr 6 7 8 brn (rel) branch never ? 1 = 0 rel 21 rr 3 brset(opr) (msk) (rel) branch if bit(s) set ? (m ) ?mm = 0 dir ind,x ind,y 12 1e 18 1e dd mm rr ff mm rr ff mm rr 6 7 8 bset (opr) (msk) set bit(s) m + mm t m dir ind,x ind,y 14 1c 18 1c dd mm ff mm ff mm 6 7 8 dd 0 bsr (rel) branch to subroutine see figure 3? rel 8d rr 6 bvc (rel) branch if overflow clear ? v = 0 rel 28rr 3 bvs (rel) branch if overflow set ? v = 1 rel 29rr 3 cba compare a to b a b inh 11 2 dddd clc clear carry bit 0 t c inh 0c 2 0 cli clear interrupt mask 0 t i inh 0e 2 0 clr (opr) clear memory byte 0 t m ext ind,x ind,y 7f 6f 18 6f hh ll ff ff 6 6 7 0100 clra clear accumulator a 0 t a a inh 4f 2 0100 clrb clear accumulator b 0 t b b inh 5f 2 0100 clv clear overflow flag 0 t v inh 0a 2 0 cmpa (opr) compare a to memory a ?m a imm a dir a ext a ind,x a ind,y 81 91 b1 a1 18 a1 ii dd hh ll ff ff 2 3 4 4 5 dddd cmpb (opr) compare b to memory b ?m b imm b dir b ext b ind,x b ind,y c1 d1 f1 e1 18 e1 ii dd hh ll ff ff 2 3 4 4 5 dddd table 3-2 instruction set (sheet 2 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c
MC68HC11F1 central processing unit motorola technical data 3-11 com (opr) ones complement memory byte $ff ?m t m ext ind,x ind,y 73 63 18 63 hh ll ff ff 6 6 7 dd 01 coma ones complement a $ff ?a t a a inh 43 2 dd 01 comb ones complement b $ff ?b t b b inh 53 2 dd 01 cpd (opr) compare d to memory 16-bit d ?m : m + 1 imm dir ext ind,x ind,y 1a 83 1a 93 1a b3 1a a3 cd a3 jj kk dd hh ll ff ff 5 6 7 7 7 dddd cpx (opr) compare x to memory 16-bit ix ?m : m + 1 imm dir ext ind,x ind,y 8c 9c bc ac cd ac jj kk dd hh ll ff ff 4 5 6 6 7 dddd cpy (opr) compare y to memory 16-bit iy ?m : m + 1 imm dir ext ind,x ind,y 18 8c 18 9c 18 bc 1a ac 18 ac jj kk dd hh ll ff ff 5 6 7 7 7 dddd daa decimal adjust a adjust sum to bcd inh 19 2 dddd dec (opr) decrement memory byte m ?1 t m ext ind,x ind,y 7a 6a 18 6a hh ll ff ff 6 6 7 ddd deca decrement accumulator a a ?1 t a a inh 4a 2 ddd decb decrement accumulator b b ?1 t b b inh 5a 2 ddd des decrement stack pointer sp ?1 t sp inh 34 3 dex decrement index register x ix ?1 t ix inh 09 3 d dey decrement index register y iy ?1 t iy inh 18 09 4 d eora (opr) exclusive or a with memory a ? m t a a imm a dir a ext a ind,x a ind,y 88 98 b8 a8 18 a8 ii dd hh ll ff ff 2 3 4 4 5 dd 0 eorb (opr) exclusive or b with memory b ? m t b b imm b dir b ext b ind,x b ind,y c8 d8 f8 e8 18 e8 ii dd hh ll ff ff 2 3 4 4 5 dd 0 fdiv fractional divide 16 by 16 d / ix t ix; r t d inh 03 41 ddd idiv integer divide 16 by 16 d / ix t ix; r t d inh 02 41 d 0 d inc (opr) increment memory byte m + 1 t m ext ind,x ind,y 7c 6c 18 6c hh ll ff ff 6 6 7 ddd inca increment accumulator a a + 1 t a a inh 4c 2 ddd incb increment accumulator b b + 1 t b b inh 5c 2 ddd ins increment stack pointer sp + 1 t sp inh 31 3 inx increment index register x ix + 1 t ix inh 08 3 d table 3-2 instruction set (sheet 3 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c
motorola central processing unit MC68HC11F1 3-12 technical data iny increment index register y iy + 1 t iy inh 18 08 4 d jmp (opr) jump see figure 3? ext ind,x ind,y 7e 6e 18 6e hh ll ff ff 3 3 4 jsr (opr) jump to subroutine see figure 3? dir ext ind,x ind,y 9d bd ad 18 ad dd hh ll ff ff 5 6 6 7 ldaa (opr) load accumulator a m t a a imm a dir a ext a ind,x a ind,y 86 96 b6 a6 18 a6 ii dd hh ll ff ff 2 3 4 4 5 dd 0 ldab (opr) load accumulator b m t b b imm b dir b ext b ind,x b ind,y c6 d6 f6 e6 18 e6 ii dd hh ll ff ff 2 3 4 4 5 dd 0 ldd (opr) load double accumulator d m t a,m + 1 t b imm dir ext ind,x ind,y cc dc fc ec 18 ec jj kk dd hh ll ff ff 3 4 5 5 6 dd 0 lds (opr) load stack pointer m : m + 1 t sp imm dir ext ind,x ind,y 8e 9e be ae 18 ae jj kk dd hh ll ff ff 3 4 5 5 6 dd 0 ldx (opr) load index register x m : m + 1 t ix imm dir ext ind,x ind,y ce de fe ee cd ee jj kk dd hh ll ff ff 3 4 5 5 6 dd 0 ldy (opr) load index register y m : m + 1 t iy imm dir ext ind,x ind,y 18 ce 18 de 18 fe 1a ee 18 ee jj kk dd hh ll ff ff 4 5 6 6 6 dd 0 lsl (opr) logical shift left ext ind,x ind,y 78 68 18 68 hh ll ff ff 6 6 7 dddd lsla logical shift left a a inh 48 2 dddd lslb logical shift left b b inh 58 2 dddd lsld logical shift left double inh 05 3 dddd lsr (opr) logical shift right ext ind,x ind,y 74 64 18 64 hh ll ff ff 6 6 7 0 ddd lsra logical shift right a a inh 44 2 0 ddd lsrb logical shift right b b inh 54 2 0 ddd lsrd logical shift right double inh 04 3 0 ddd mul multiply 8 by 8 a * b t d inh 3d 10 d neg (opr) two? complement memory byte 0 ?m t m ext ind,x ind,y 70 60 18 60 hh ll ff ff 6 6 7 dddd nega two? complement a 0 ?a t a a inh 40 2 dddd negb two? complement b 0 ?b t b b inh 50 2 dddd table 3-2 instruction set (sheet 4 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 a b b7 b0 c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 c 0 b7 b0 a b b7 b0
MC68HC11F1 central processing unit motorola technical data 3-13 nop no operation no operation inh 01 2 oraa (opr) or accumulator a (inclusive) a + m t a a imm a dir a ext a ind,x a ind,y 8a 9a ba aa 18 aa ii dd hh ll ff ff 2 3 4 4 5 dd 0 orab (opr) or accumulator b (inclusive) b + m t b b imm b dir b ext b ind,x b ind,y ca da fa ea 18 ea ii dd hh ll ff ff 2 3 4 4 5 dd 0 psha push a onto stack a t stk,sp = sp ?1 a inh 36 3 pshb push b onto stack b t stk,sp = sp ?1 b inh 37 3 pshx push x onto stack (lo first) ix t stk,sp = sp ?2 inh 3c 4 pshy push y onto stack (lo first) iy t stk,sp = sp ?2 inh 18 3c 5 pula pull a from stack sp = sp + 1, a stka inh 32 4 pulb pull b from stack sp = sp + 1, b stkb inh 33 4 pulx pull x from stack (hi first) sp = sp + 2, ix stk inh 38 5 puly pull y from stack (hi first) sp = sp + 2, iy stk inh 18 38 6 rol (opr) rotate left ext ind,x ind,y 79 69 18 69 hh ll ff ff 6 6 7 dddd rola rotate left a a inh 49 2 dddd rolb rotate left b b inh 59 2 dddd ror (opr) rotate right ext ind,x ind,y 76 66 18 66 hh ll ff ff 6 6 7 dddd rora rotate right a a inh 46 2 dddd rorb rotate right b b inh 56 2 dddd rti return from interrupt see figure 3? inh 3b 12 ddddddd rts return from subroutine see figure 3? inh 39 5 sba subtract b from a a ?b t a inh 10 2 dddd sbca (opr) subtract with carry from a a ?m ?c t a a imm a dir a ext a ind,x a ind,y 82 92 b2 a2 18 a2 ii dd hh ll ff ff 2 3 4 4 5 dddd sbcb (opr) subtract with carry from b b ?m ?c t b b imm b dir b ext b ind,x b ind,y c2 d2 f2 e2 18 e2 ii dd hh ll ff ff 2 3 4 4 5 dddd sec set carry 1 t c inh 0d 2 1 sei set interrupt mask 1 t i inh 0f 2 1 sev set overflow flag 1 t v inh 0b 2 1 staa (opr) store accumulator a a t m a dir a ext a ind,x a ind,y 97 b7 a7 18 a7 dd hh ll ff ff 3 4 4 5 dd 0 table 3-2 instruction set (sheet 5 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c c b7 b0 c b7 b0 c b7 b0 c b7 b0 c b7 b0 c b7 b0
motorola central processing unit MC68HC11F1 3-14 technical data stab (opr) store accumulator b b t m b dir b ext b ind,x b ind,y d7 f7 e7 18 e7 dd hh ll ff ff 3 4 4 5 dd 0 std (opr) store accumulator d a t m, b t m + 1 dir ext ind,x ind,y dd fd ed 18 ed dd hh ll ff ff 4 5 5 6 dd 0 stop stop internal clocks inh cf 2 sts (opr) store stack pointer sp t m : m + 1 dir ext ind,x ind,y 9f bf af 18 af dd hh ll ff ff 4 5 5 6 dd 0 stx (opr) store index register x ix t m : m + 1 dir ext ind,x ind,y df ff ef cd ef dd hh ll ff ff 4 5 5 6 dd 0 sty (opr) store index register y iy t m : m + 1 dir ext ind,x ind,y 18 df 18 ff 1a ef 18 ef dd hh ll ff ff 5 6 6 6 dd 0 suba (opr) subtract memory from a a ?m t a a imm a dir a ext a ind,x a ind,y 80 90 b0 a0 18 a0 ii dd hh ll ff ff 2 3 4 4 5 dddd subb (opr) subtract memory from b b ?m t b a imm a dir a ext a ind,x a ind,y c0 d0 f0 e0 18 e0 ii dd hh ll ff ff 2 3 4 4 5 dddd subd (opr) subtract memory from d d ?m : m + 1 t d imm dir ext ind,x ind,y 83 93 b3 a3 18 a3 jj kk dd hh ll ff ff 4 5 6 6 7 dddd swi software interrupt see figure 3? inh 3f 14 1 tab transfer a to b a t b inh 16 2 dd 0 tap transfer a to cc register a t ccr inh 06 2 ddddddd tba transfer b to a b t a inh 17 2 dd 0 test test (only in test modes) address bus counts inh 00 * tpa transfer cc register to a ccr t a inh 07 2 tst (opr) test for zero or minus m ?0 ext ind,x ind,y 7d 6d 18 6d hh ll ff ff 6 6 7 dd 00 tsta test a for zero or minus a 0 a inh 4d 2 dd 00 tstb test b for zero or minus b 0 b inh 5d 2 dd 00 tsx transfer stack pointer to x sp + 1 t ix inh 30 3 tsy transfer stack pointer to y sp + 1 t iy inh 18 30 4 txs transfer x to stack pointer ix ?1 t sp inh 35 3 tys transfer y to stack pointer iy ?1 t sp inh 18 35 4 wai wait for interrupt stack regs & wait inh 3e ** xgdx exchange d with x ix t d, d t ix inh 8f 3 xgdy exchange d with y iy t d, d t iy inh 18 8f 4 table 3-2 instruction set (sheet 6 of 6) mnemonic operation description addressing instruction condition codes mode opcode operand cycles s x h i n z v c
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-1 section 4operating modes and on-chip memory this section contains information about the modes that define MC68HC11F1 operat- ing conditions, and about the on-chip memory that allows the mcu to be configured for various applications. 4.1 operating modes the values of the mode select inputs modb and moda during reset determine the operating mode. single chip and expanded modes are the normal modes. in single- chip mode only on-board resources are available. expanded mode, however, allows access to external memory or peripheral devices. each of these two normal modes is paired with a special mode. bootstrap mode, a variation of the single-chip mode, exe- cutes a bootloader program from an internal bootstrap rom. test mode allows privi- leged access to internal resources. 4.1.1 single-chip operating mode in single-chip operating mode, the MC68HC11F1 has no external address or data bus. ports b, c, and f are available for general-purpose i/o. 4.1.2 expanded operating mode in expanded operating mode, the mcu can access a 64-kbyte physical address space. the address space includes the same on-chip memory addresses used for sin- gle-chip mode, in addition to external memory and peripheral devices. the expansion bus is made up of ports b, c, f and the r/w signal. in expanded mode, high order address bits are output on the port b pins, low order address bits on the port f pins, and the data bus on port c. the r/w pin indicates the direction of data transfer on the port c bus. 4.1.3 special test mode special test mode, a variation of the expanded mode, is primarily used during motor- ola's internal production testing; however, it is accessible for programming the con- fig register, programming calibration data into eeprom, and supporting emulation and debugging during development. 4.1.4 special bootstrap mode bootstrap mode is a special variation of the single-chip mode. bootstrap mode allows special-purpose programs to be entered into internal ram. when boot mode is select- ed at reset, a small bootstrap rom becomes present in the memory map. reset and interrupt vectors are located in bootstrap rom at $bfc0?bfff. the mcu fetches the reset vector, then executes the bootloader.
motorola operating modes and on-chip memory MC68HC11F1 4-2 technical data the bootstrap rom contains a small program which initializes the sci and allows the user to download a program of up to 1024 bytes into on-chip ram. after a four-char- acter delay, or after receiving the character for address $03ff, control passes to the loaded program at $0000. an external pull-up resistor is required when using the sci transmitter pin (txd) because port d pins are configured for wired-or operation by the bootloader. in bootstrap mode, the interrupt vectors point to ram. this allows the use of interrupts through a jump table. refer to motorola application note an1060, m68hc11 bootstrap mode. 4.2 on-chip memory the MC68HC11F1 contains 1024 bytes of on-chip ram and 512 bytes of eeprom. the bootloader rom occupies 256 bytes. the config register is implemented as a separate eeprom byte. 4.2.1 mapping allocations memory locations for on-chip resources are the same for both expanded and single- chip modes. the 96-byte register block originates at $1000 after reset and can be placed at any other 4-kbyte boundary ($x000) after reset by writing an appropriate val- ue to the init register. refer to figure 4-1 , which illustrates the memory map. the on-board 1024-byte ram is initially located at $0000 after reset. if ram and reg- isters are both mapped to the same 4-kbyte boundary, the first 96 bytes of ram are inaccessible (registers have higher priority). remapping is accomplished by writing appropriate values to the init register. the 512-byte eeprom array is initially located at $fe00 after reset when eeprom is enabled in the memory map by the config register. in expanded and special test modes eeprom can be placed at any other 4-kbyte boundary ($xe00) by program- ming bits ee[3:0] in the config register to an appropriate value. in single-chip and bootstrap modes the eeprom is forced on and cannot be remapped. in special bootstrap mode, a bootloader rom is enabled at locations $bf00?bfff. the vectors for special bootstrap mode are contained in the bootloader program. the boot rom fills 256 bytes of the memory map even though not all locations are used.
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-3 4.2.2 memory map figure 4-1 MC68HC11F1 memory map 4.2.2.1 ram the MC68HC11F1 microcontroller has 1024 bytes of fully static ram that can be used for storing instructions, variables, and temporary data during program execution. ram can be placed at any 4-kbyte boundary in the 64 kbyte address space by writing an appropriate value to the init register. ram is initially located at $0000 in the memory map upon reset. direct addressing mode can access the first 256 locations of ram using a one-byte address operand. direct mode accesses save program memory space and execution time. the on-chip ram is a fully static memory. ram contents can be preserved during pe- riods of processor inactivity by either of two methods, both of which reduce power con- sumption. notes: 1. ram can be remapped to any 4-kbyte boundary ($x000). "x" represents the value contained in ram[3:0] in the init register. 2. the register block can be remapped to any 4-kbyte boundary ($y000). "y" represents the value contained in reg[3:0] in the init register. 3. special test mode vectors are externally addressed. 4. in special test mode the address locations $zd00?zdff are not externally addressable. "z" represents the value of bits ee[3:0] in the config register. 5. eeprom can be remapped to any 4-kbyte boundary ($z000). "z" represents the value contained in ee[3:0] in the config register. ze00 expanded 512 bytes eeprom 5 ffc0 ffff normal mode interrupt vectors 1024 bytes ram 1 single chip bootstrap special test ext $0000 $1000 $ffff x000 y000 y05f bf00 zfff bfc0 bfff special mode 3 interrupt vectors ext x3ff 96-byte register block 2 $fe00 256 bytes bootstrap rom zd00 256 bytes reserved 4 (special test mode only) zdff ext ext ext
motorola operating modes and on-chip memory MC68HC11F1 4-4 technical data during the software-based stop mode, mcu clocks are stopped, but the mcu con- tinues to draw power from v dd . power supply current is directly proportional to oper- ating frequency in cmos integrated circuits and there is very little leakage when the clocks are stopped. these two factors reduce power consumption while the mcu is in stop mode. to reduce power consumption to a minimum, v dd can be turned off, and the modb/ v stby pin can be used to supply ram power from either a battery back-up or a sec- ond power supply. although this method requires external hardware, it is very effec- tive. refer to section 2 pin descriptions for information about how to connect the standby ram power supply. refer to section 5 resets and interrupts for a description of low power operation. figure 4-2 ram standby modb/v stby connections 4.2.2.2 bootloader rom the bootloader rom is enabled at address $bf00?bfff during special bootstrap mode. the reset vector is fetched from this rom and the mcu executes the bootload- er firmware. in normal modes, the bootloader rom is disabled. 4.2.2.3 eeprom the MC68HC11F1 contains 512 bytes of electrically erasable programmable read- only memory (eeprom). the default location for eeprom is $fe00?ffff. other locations can be chosen according to the values written to ee[3:0] in the config reg- ister. in single-chip and bootstrap modes, the eeprom is forced on and located at the default position. in these modes, the eeprom cannot be remapped. in special test mode, the eeprom is disabled initially. 4.2.3 registers table 4-1 , a summary of registers and control bits, the registers are shown in ascend- ing order within the 96-byte register block. the addresses shown are for default block mapping ($1000?105f), however, the register block can be remapped to any 4-kbyte page ($x000?x05f) by the init register. v batt v dd to modb/v stby of m68hc11 v out v dd + max 690 4.8 v nicd 4.7 k
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-5 table 4-1 register and control bit assignments the register block can be remapped to any 4-kbyte boundary. bit 7 654321 bit 0 $1000 pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 porta $1001 dda7 dda6 dda5 dda4 dda3 dda2 dda1 dda0 ddra $1002 pg7 pg6 pg5 pg4 pg3 pg2 pg1 pg0 portg $1003 ddg7 ddg6 ddg5 ddg4 ddg3 ddg2 ddg1 ddg0 ddrg $1004 pb7 pb6 pb5 pb4 pb3 pb2 pb1 pb0 portb $1005 pf7 pf6 pf5 pf4 pf3 pf2 pf1 pf0 portf $1006 pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 portc $1007 ddc7 ddc6 ddc5 ddc4 ddc3 ddc2 ddc1 ddc0 ddrc $1008 0 0 pd5 pd4 pd3 pd2 pd1 pd0 portd $1009 0 0 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 ddrd $100a pe7 pe6 pe5 pe4 pe3 pe2 pe1 pe0 porte $100b foc1 foc2 foc3 foc4 foc5 0 0 0 cforc $100c oc1m7 oc1m6 oc1m5 oc1m4 oc1m3 0 0 0 oc1m $100d oc1d7 oc1d6 oc1d5 oc1d4 oc1d3 0 0 0 oc1d $100e bit 15 14 13 12 11 10 9 bit 8 tcnt (high) $100f bit 7 654321 bit 0 tcnt (low) $1010 bit 15 14 13 12 11 10 9 bit 8 tic1 (high) $1011 bit 7 654321 bit 0 tic1 (low) $1012 bit 15 14 13 12 11 10 9 bit 8 tic2 (high) $1013 bit 7 654321 bit 0 tic2 (low) $1014 bit 15 14 13 12 11 10 9 bit 8 tic3 (high) $1015 bit 7 654321 bit 0 tic3 (low) $1016 bit 15 14 13 12 11 10 9 bit 8 toc1 (high) $1017 bit 7 654321 bit 0 toc1 (low) $1018 bit 15 14 13 12 11 10 9 bit 8 toc2 (high) $1019 bit 7 654321 bit 0 toc2 (low) $101a bit 15 14 13 12 11 10 9 bit 8 toc3 (high) $101b bit 7 654321 bit 0 toc3 (low) $101c bit 15 14 13 12 11 10 9 bit 8 toc4 (high) $101d bit 7 654321 bit 0 toc4 (low) $101e bit 15 14 13 12 11 10 9 bit 8 ti4/o5 (high) $101f bit 7 654321 bit 0 ti4/o5 (low) $1020 om2 ol2 om3 ol3 om4 ol4 om5 ol5 tctl1 $1021 edg4b edg4a edg1b edg1a edg2b edg2a edg3b edg3a tctl2 $1022 oc1i oc2i oc3i oc4i i4/o5i ic1i ic2i ic3i tmsk1 $1023 oc1f oc2f oc3f oc4f i4/o5f ic1f ic2f ic3f tflg1 $1024 toi rtii paovi paii 0 0 pr1 pr0 tmsk2 $1025 tof rtif paovf paif 0000 tflg2 $1026 0 paen pamod pedge 0 i4/o5 rtr1 rtr0 pactl $1027 bit 7 654321 bit 0 pacnt
motorola operating modes and on-chip memory MC68HC11F1 4-6 technical data 4.3 system initialization registers and bits that control initialization and the basic operation of the mcu are pro- tected against writes except under special circumstances. the following table lists reg- isters that can be written only once after reset or that must be written within the first 64 cycles after reset. $1028 spie spe dwom mstr cpol cpha spr1 spr0 spcr $1029 spif wcol 0 modf 0 0 0 bit 0 spsr $102a bit 7 654321 bit 0 spdr $102b tclr 0 scp1 scp0 rckb scr2 scr1 scr0 baud $102c r8 t8 0 m wake 0 0 0 sccr1 $102d tie tcie rie ilie te re rwu sbk sccr2 $102e tdre tc rdrf idle or nf fe 0 scsr $102f bit 7 654321 bit 0 scdr $1030 ccf 0 scan mult cd cc cb ca adctl $1031 bit 7 654321 bit 0 adr1 $1032 bit 7 654321 bit 0 adr2 $1033 bit 7 654321 bit 0 adr3 $1034 bit 7 654321 bit 0 adr4 $1035 0 0 0 ptcon bprt3 bprt2 bprt1 bprt0 bprot $1036 reserved $1037 reserved $1038 gwom cwom clk4x 00000 opt2 $1039 adpu csel irqe dly cme fcme cr1 cr0 option $103a bit 7 654321 bit 0 coprst $103b odd even 0 byte row erase eelat eepgm pprog $103c rboot smod mda irv psel3 psel2 psel1 psel0 hprio $103d ram3 ram2 ram1 ram0 reg3 reg2 reg1 reg0 init $103e tilop 0 occr cbyp disr fcm fcop 0 test1 $103f ee3` ee2 ee1 ee0 1 nocop 1 eeon config $1040 reserved to $105b reserved $105c io1sa io1sb io2sa io2sb gstha gsthb pstha psthb csstrh $105d io1en io1pl io2en io2pl gcspr pcsen psiza psizb csctl $105e ga15 ga14 ga13 ga12 ga11 ga10 0 0 csgadr $105f io1av io2av 0 gnpol gavld gsiza gsizb gsizc csgsiz table 4-1 register and control bit assignments (continued) the register block can be remapped to any 4-kbyte boundary. bit 7 654321 bit 0
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-7 notes: 1. bits 1 and 0 can be written once only in first 64 cycles. when smod = 1, these bits can be written any time. all other bits can be written at any time. 2. bits can be written to zero (protection disabled) once only in first 64 cycles or at any time in special modes. bits can be set to one at any time. 3. bits 5, 4, 2, 1, and 0 can be written once only in first 64 cycles. when smod = 1, bits 5, 4, 2, 1, and 0 can be written at any time. all other bits can be written at any time 4. bit 5 (clk4x) can be written only one time. 5. bit 4 (irv) can be written only one time. 6. can be written once in first 64 cycles after reset in normal modes or at any time in special modes. 4.3.1 mode selection the four mode variations are selected by the logic levels present on the moda and modb pins at the rising edge of reset . the moda and modb logic levels determine the logic state of smod and mda control bits in the hprio register. after reset is released, the mode select pins no longer influence the mcu operating mode. in single-chip operating mode, the moda pin is connected to a logic level zero. in expanded mode, moda should be connected to v dd through a pull-up resistor of 4.7 k w . the moda pin also functions as the load instruction register (lir ) pin when the mcu is not in reset. the open-drain active low lir output pin drives low during the first e cycle of each instruction (opcode fetch). the modb pin also functions as stand- by power input (v stby ), which allows ram contents to be maintained in absence of v dd . refer to appendix a electrical characteristics for v stby voltage requirements. refer to table 4-3 , which is a summary of mode pin operation, the mode control bits, and the four operating modes. table 4-2 write access limited registers register address register name must be written in first 64 cycles write one time only $x024 timer interrupt mask 2 (tmsk2) note 1 $x035 block protect register (bprot) note 2 $x038 system configuration options 2 (opt2) no note 4 $x039 system configuration options (option) note 3 $x03c highest priority i-bit and miscellaneous (hprio) no note 5 $x03d ram and i/o map register (init) yes note 6 table 4-3 hardware mode select summary input levels at reset mode control bits in hprio (latched at reset) modb moda rboot smod mda 1 0 single chip 0 0 0 1 1 expanded 0 0 1 0 0 special bootstrap 1 1 0 0 1 special test 0 1 1
motorola operating modes and on-chip memory MC68HC11F1 4-8 technical data a normal mode is selected when modb is logic one during reset. one of three reset vectors is fetched from address $fffa?ffff, and program execution begins from the address indicated by this vector. if modb is logic zero during reset, the special mode reset vector is fetched from addresses $bffa?bfff and software has access to special test features. refer to section 5 resets and interrupts for infor- mation regarding reset vectors. 4.3.1.1 hprio register bits in the hprio register select the highest priority interrupt level, select whether bootstrap rom is present, and control visibility of internal reads by the cpu. after re- set, mda and smod select the operating mode. *reset states of rboot, smod, and mda bits depend on hardware mode selection. refer to table 4-3 . rboot ?read bootstrap rom set to one out of reset in bootstrap mode. valid while in special modes only. can be read anytime. can only be written in special modes. 0 = bootloader rom disabled and not in map 1 = bootloader rom enabled and in map at $bf00?bfff smod and mda ?special mode select and mode select a the initial value of smod is the inverse of the logic level present on the modb pin at the rising edge of reset. the initial value of mda equals the logic level present on the moda pin at the rising edge of reset. these two bits can be read at any time. they can be written at any time in special modes. neither bit can be written is normal modes. smod cannot be set once it has been cleared. refer to table 4-3 . irv ?internal read visibility irv can be written at any time in special modes (smod = 1). in normal modes (smod = 0) irv can be written only once. in expanded and test modes, irv determines whether internal read visibility is on or off. in single-chip and bootstrap modes, irv has no meaning or effect. 0 = no internal read visibility on external bus 1 = data from internal reads is driven out the external data bus. psel[3:0] ?priority select bits [3:0] refer to 5.3.1 highest priority interrupt and miscellaneous register . hprio ?highest priority i-bit interrupt and miscellaneous $103c bit 7 654321 bit 0 rboot* smod* mda* irv psel3 psel2 psel1 psel0 reset: 0 0 000110 single chip 0 0 100110 expanded 1 1 010110 bootstrap 0 1 110110 special test
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-9 4.3.2 initialization because bits in the following registers control the basic configuration of the mcu, an accidental change of their values could cause serious system problems. the protec- tion mechanism, overridden in special operating modes, requires a write to the protect- ed bits only within the first 64 bus cycles after any reset, or only once after each reset. table 4-2 summarizes the write access limited registers. 4.3.2.1 config register config controls the presence and position of the eeprom in the memory map. config also enables the cop watchdog timer. p indicates a previously programmed bit. p(l) indicates that the bit resets to the logic level held in the latch prior to reset, but the function of cop is controlled by disr bit in test1 register. the config register consists of an eeprom byte and static latches that control the start-up con?uration of the mcu. the contents of the eeprom byte are transferred into static working latches during reset sequences. the operation of the mcu is con- trolled directly by these latches and not by config itself. in normal modes, changes to config do not affect operation of the mcu until after the next reset sequence. when programming, the config register itself is accessed. when the config reg- ister is read, the static latches are accessed. these bits can be read at any time. the value read is the one latched into the register from the eeprom cells during the last reset sequence. a new value programmed into this register cannot be read until after a subsequent reset sequence. unused bits al- ways read as ones. in special test mode, the static latches can be written directly at any time. in all modes, config bits can only be programmed using the eeprom programming sequence, and are neither readable nor active until latched via the next reset. refer to 4.4.3 con- fig register programming . ee[3:0] ?eeprom mapping control ee[3:0] select the upper four bits of the eeprom base address. in single-chip and bootstrap modes, eeprom is forced to $fe00?ffff regardless of the value of ee[3:0]. config ?system configuration register $103f bit 7 654321 bit 0 ee3 ee2 ee1 ee0 nocop eeon reset: 11111p11 single chip 11111 p(l) 1 1 bootstrap pppp1p1p expanded pppp1 p(l) 1 0 special test
motorola operating modes and on-chip memory MC68HC11F1 4-10 technical data bit 3 ?not implemented always reads one nocop ?cop system disable 0 = cop system enabled (forces reset on time-out) 1 = cop system disabled bit 1 ?not implemented always reads one eeon ?eeprom enable in single-chip modes eeon is forced to one (eeprom enabled). 0 = 512 bytes of eeprom is disabled from the memory map 1 = 512 bytes of eeprom is present in the memory map 4.3.2.2 init register the internal registers used to control the operation of the mcu can be relocated on 4- kbyte boundaries within the memory space with the use of init. this 8-bit special-pur- pose register can change the default locations of the ram and control registers within the mcu memory map. it can be written only once within the first 64 e-clock cycles after a reset. it then becomes a read-only register. table 4-4 eeprom mapping ee[3:0] eeprom position 0 0 0 0 $0e00 ?$0fff 0 0 0 1 $1e00 ?$1fff 0 0 1 0 $2e00 ?$2fff 0 0 1 1 $3e00 ?$3fff 0 1 0 0 $4e00 ?$4fff 0 1 0 1 $5e00 ?$5fff 0 1 1 0 $6e00 ?$6fff 0 1 1 1 $7e00 ?$7fff 1 0 0 0 $8e00 ?$8fff 1 0 0 1 $9e00 ?$9fff 1 0 1 0 $ae00 ?$afff 1 0 1 1 $be00 ?$bfff 1 1 0 0 $ce00 ?$cfff 1 1 0 1 $de00 ?$dfff 1 1 1 0 $ee00 ?$efff 1 1 1 1 $fe00 ?$ffff init ?ram and i/o mapping register $103d bit 7 654321 bit 0 ram3 ram2 ram1 ram0 reg3 reg2 reg1 reg0 reset: 0000000 1
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-11 ram[3:0] ?ram map position these four bits, which specify the upper hexadecimal digit of the ram address, control position of ram in the memory map. ram can be positioned at the beginning of any 4-kbyte page in the memory map. refer to table 4-5 . reg[3:0] ?128-byte register block position these four bits specify the upper hexadecimal digit of the address for the 128-byte block of internal registers. the register block is positioned at the beginning of any 4- kbyte page in the memory map. refer to table 4-5 . when the memory map has the 96-byte register block mapped at the same location as ram, the registers have priority and the lower 96 bytes of ram are inaccessible. no harmful con?cts occur due to a hardware resource priority scheme. on-chip reg- isters have the highest priority of all on-chip resources, followed by on-chip ram, boot- strap rom, and on-chip eeprom. 4.3.2.3 option register the 8-bit special-purpose option register sets internal system configuration options during initialization. in single-chip and expanded modes (smod = 0), irqe, dly, fc- me, and cr[1:0] can be written only once and only in the first 64 cycles after a reset. this minimizes the possibility of any accidental changes to the system configuration. in special test and bootstrap modes (smod = 1), these bits can be written at any time. *can be written only once in first 64 cycles out of reset in normal modes or at any time in special modes. table 4-5 ram and register mapping ram[3:0] location reg[3:0] location 0000 $0000?03ff 0000 $0000?005f 0001 $1000?13ff 0001 $1000?105f 0010 $2000?23ff 0010 $2000?205f 0011 $3000?33ff 0011 $3000?305f 0100 $4000?43ff 0100 $4000?405f 0101 $5000?53ff 0101 $5000?505f 0110 $6000?63ff 0110 $6000?605f 0111 $7000?73ff 0111 $7000?705f 1000 $8000?83ff 1000 $8000?805f 1001 $9000?93ff 1001 $9000?905f 1010 $a000?a3ff 1010 $a000?a05f 1011 $b000?b3ff 1011 $b000?b05f 1100 $c000?c3ff 1100 $c000?c05f 1101 $d000?d3ff 1101 $d000?d05f 1110 $e000?e3ff 1110 $e000?e05f 1111 $f000?f3ff 1111 $f000?f05f option ?system configuration options $1039 bit 7 654321 bit 0 adpu csel irqe* dly* cme fcme* cr1* cr0* reset: 0000000 0
motorola operating modes and on-chip memory MC68HC11F1 4-12 technical data adpu ?a/d power-up refer to section 10 analog-to-digital converter . 0 = a/d system disabled 1 = a/d system power enabled csel ?clock select selects alternate clock source for on-chip eeprom and a/d charge pumps. on-chip rc clock should be used when e clock falls below 1 mhz. refer to section 10 an- alog-to-digital converter . 0 = a/d and eeprom use system e clock 1 = a/d and eeprom use internal rc clock irqe ?con?ure irq for falling edge-sensitive operation refer to section 5 resets and interrupts . 0 = low level-sensitive operation. 1 = falling edge-sensitive only operation. dly ?enable oscillator start-up delay refer to section 5 resets and interrupts . 0 = the oscillator start-up delay coming out of stop is bypassed and the mcu re- sumes processing within about four bus cycles. 1 = a delay of approximately 4000 e-clock cycles is imposed as the mcu is started up from the stop power-saving mode. cme ?clock monitor enable in order to use both stop and clock monitor, the cme bit must be written to zero be- fore executing stop, then written to one after recovering from stop. refer to sec- tion 5 resets and interrupts . 0 = clock monitor disabled 1 = clock monitor enabled fcme ?force clock monitor enable when fcme equals one, slow or stopped clocks will cause a clock failure reset. to use stop mode, fcme must always equal zero. refer to section 5 resets and interrupts . 0 = clock monitor follows state of cme bit 1 = clock monitor enabled and cannot be disabled until next reset cr[1:0] ?cop timer rate select bits these control bits determine a scaling factor for the watchdog timer. refer to sec- tion 5 resets and interrupts . 4.3.2.4 opt2 register the system configuration options 2 register (opt2) controls three additional system options.
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-13 gwom ?port g wired-or mode refer to section 6 parallel input/output . 0 = port g operates normally. 1 = port g outputs are open-drain type. cwom ?port c wired-or mode refer to section 6 parallel input/output . 0 = port c operates normally. 1 = port c outputs are open-drain type. clk4x ?4xout clock enable the 4xout signal, when enabled, is a buffered xtal signal and is four times the fre- quency of the e-clock. this buffered clock is intended to synchronize external devices with the mcu. refer to section 2 pin descriptions . 0 = the 4xout pin is driven low. 1 = the 4xout signal is driven on the 4xout pin. bits [4:0] ?not implemented always read zero 4.3.2.5 block protect register (bprot) bprot prevents accidental writes to eeprom and the config register. the bits in this register can be written to zero during the first 64 e-clock cycles after reset in the normal modes. once the bits are cleared to zero, the eeprom array and the config register can be programmed or erased. setting the bits in the bprot register to logic one protects the eeprom and config register until the next reset. refer to table 4-6 . bits [7:5] ?not implemented always read zero ptcon ?protect for config 0 = config register can be programmed or erased normally 1 = config register cannot be programmed or erased bprt[3:0] ?block protect bits for eeprom 0 = protection disabled for associated block 1 = protection enabled for associated block opt2 ?system configuration options 2 $1038 bit 7 654321 bit 0 gwom cwom clk4x reset: 0000000 0 bprot ?block protect $1035 bit 7 654321 bit 0 ptcon bprt3 bprt2 bprt1 bprt0 reset: 0001111 1
motorola operating modes and on-chip memory MC68HC11F1 4-14 technical data 4.4 eeprom and config register the 512-byte eeprom array and the single-byte config register are implemented with the same type of memory cells. the config register is a separate address lo- cated within the register block rather than in the eeprom array. unlike other registers within the register block, the config register can only be altered using the eeprom programming procedure. 4.4.1 eeprom the 512-byte on-board eeprom is initially located from $fe00 to $ffff after reset in single-chip modes. it can be mapped to any other 4-kbyte boundary by program- ming bits ee[3:0] in the config register. the eeprom is enabled by the eeon bit in the config register. programming and erasing is controlled by the pprog regis- ter. unlike information stored in rom, data in the 512 bytes of eeprom can be erased and reprogrammed under software control. because programming and erasing oper- ations use an on-chip charge pump, a separate external power supply is not required. use of the block protect register (bprot) prevents inadvertent writes to (or erases of) blocks of eeprom. the csel bit in the option register selects an on-chip oscillator clock for programming and erasing while operating at frequencies below 1 mhz. 4.4.1.1 eeprom programming an exact register access sequence must be followed to allow successful programming and erasure of the eeprom. the following procedures for modifying the eeprom and config register detail the sequence. if an attempt is made to set both eelat and eepgm bits in the same write cycle and this attempt occurs before the required write cycle with the eelat bit set, then neither bit is set. if a write to an eeprom ad- dress is performed while the eepgm bit is set, the write is ignored, and the program- ming operation in progress is not disturbed. if no eeprom address is written between the point at which eelat is set and eepgm is set, then no program or erase operation occurs. these safeguards are included to prevent accidental eeprom changes in cases of program runaway. if the frequency of the e clock is 1 mhz or less, the csel bit in the option register must be set to select the internal rc clock. when the eelat bit in the pprog register is cleared, the eeprom can be read as if it were a rom. the block protect register has no effect during reads. during ee- prom programming, the row and byte bits of pprog are not used. table 4-6 eeprom block protection bit name block protected block size bprt0 $xe00?xe1f 32 bytes bprt1 $xe20?xe5f 64 bytes bprt2 $xe60?xedf 128 bytes bprt3 $xee0?xfff 288 bytes
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-15 recall that zeros must be erased by a separate erase operation before programming. the following example of how to program an eeprom byte assumes that the appro- priate bits in bprot have been cleared and the data to be programmed is present in accumulator a. 4.4.1.2 eeprom bulk erase to erase the eeprom, ensure that the proper bits of the bprot register are cleared, then complete the following steps using the pprog register: 1. write to pprog with the erase, eelat, and appropriate byte and row bits set. 2. write to the appropriate eeprom address with any data. row erase only re- quires a write to any location in the row. bulk erase is accomplished by writing to any location in the array. 3. write to pprog with erase, eelat, eepgm, and the appropriate byte and row bits set. 4. delay for 10 ms or more, as appropriate. 5. clear the eepgm bit in pprog to turn off the high voltage. 6. return to step 1 for next byte or row or proceed to step 7. 7. clear the pprog register to reconfigure the eeprom address and data buses for normal operation. the following is an example of how to bulk erase the 512-byte eeprom. the config register is not affected in this example. when bulk erasing the config register, con- fig and the 512-byte array are all erased. 4.4.1.3 eeprom row erase the following example shows how to perform a fast erase of large sections of ee- prom and assumes that index register x contains the address of a location in the de- sired row. prog ldab #$02 eelat=1, eepgm=0 stab $103b set eelat bit staa $fe00 store data to eeprom address ldab #$03 eelat=1, eepgm=1 stab $103b turn on programming voltage jsr dly10 delay 10 ms clr $103b turn off high voltage and set to read mode bulke ldab #$06 erase=1, eelat=1, eepgm=0 stab $103b set eelat bit stab $fe00 store any data to any eeprom address ldab #$07 eelat=1, eepgm=1 stab $103b turn on programming voltage jsr dly10 delay 10 ms clr $103b turn off high voltage and set to read mode
motorola operating modes and on-chip memory MC68HC11F1 4-16 technical data 4.4.1.4 eeprom byte erase the following is an example of how to erase a single byte of eeprom and assumes that index register x contains the address of the byte to be erased. 4.4.2 pprog eeprom programming control register bits in pprog register control parameters associated with eeprom programming. odd ?program odd rows in half of eeprom (test) even ?program even rows in half of eeprom (test) bit 5 ?not implemented always reads zero byte ?byte/other eeprom erase mode 0 = row or bulk erase mode used 1 = erase only one byte of eeprom row ?row/all eeprom erase mode (only valid when byte = 0) 0 = all 512 bytes of eeprom erased 1 = erase only one 16-byte row of eeprom rowe ldab #$0e row=1, erase=1, eelat=1, eepgm=0 stab $103b set to row erase mode stab 0,x store any data to any address in row ldab #$0f row=1, erase=1, eelat=1, eepgm=1 stab $103b turn on high voltage jsr dly10 delay 10 ms clr $103b turn off high voltage and set to read mode bytee ldab #$16 byte=1, row=0, erase=1, eelat=1, eepgm=0 stab $103b set to byte erase mode stab 0,x store any data to address to be erased ldab #$17 byte=1, row=0, erase=1, eelat=1, eepgm=1 stab $103b turn on high voltage jsr dly10 delay 10 ms clr $103b turn off high voltage and set to read mode pprog ?eeprom programming control $103b bit 7 654321 bit 0 odd even byte row erase eelat eepgm reset: 0000000 0
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-17 erase ?erase/normal control for eeprom can be read or written any time. 0 = normal read or program mode 1 = erase mode eelat ?eeprom latch control can be read or written any time. when eelat equals one, writes to eeprom cause address and data to be latched. 0 = eeprom address and data bus configured for normal reads 1 = eeprom address and data bus configured for programming or erasing eepgm ?eeprom program command can be read any time. can only be written while eelat = 1. 0 = program or erase voltage switched off to eeprom array 1 = program or erase voltage switched on to eeprom array 4.4.3 config register programming because the config register is implemented with eeprom cells, use eeprom pro- cedures to erase and program this register. the procedure for programming is the same as for programming a byte in the eeprom array, except that the config reg- ister address is used. config can be programmed or erased (including byte erase) while the mcu is operating in any mode, provided that ptcon in bprot is clear. to change the value in the config register, complete the following procedure. do not initiate a reset until the procedure is complete. the new value will not take effect until after the next reset sequence. 1. erase the config register. 2. program the new value to the config address. 3. initiate reset. p indicates a previously programmed bit. p(l) indicates that the bit resets to the logic level held in the eeprom bit prior to reset, but the function of cop is controlled by disr bit in test1 register. table 4-7 eeprom erase mode control byte row action 0 0 bulk erase (all 512 bytes) 0 1 row erase (16 bytes) 1 0 byte erase 1 1 byte erase config ?system configuration register $103f bit 7 654321 bit 0 ee3 ee2 ee1 ee0 nocop eeon reset: 11111p11 single chip 11111 p(l) 1 1 bootstrap pppp1p1p expanded pppp1 p(l) 1 0 special test
motorola operating modes and on-chip memory MC68HC11F1 4-18 technical data for a description of the bits contained in the config register refer to 4.3.2.1 config register . 4.5 chip selects the function of the chip selects is to minimize the amount of external glue logic needed to interface the mcu to external devices. the MC68HC11F1 has four software config- ured chip selects that can be enabled in expanded modes. the chip selects for i/o (csio1 and csio2) are used for i/o expansion. the program chip select (csprog ) is used with an external memory that contains the program code and reset vectors. the general-purpose chip select (csgen) is the most flexible and is used to enable external devices. such factors as polarity, block size, base address and clock stretching can be con- trolled using the four chip-select control registers. when a port g pin is not used for chip select functions it can be used for general-purpose i/o. when enabled, a chip select signal is asserted whenever the cpu makes an access to a designated range of addresses. bus control signals and chip select signals are synchronous with the external e clock signal. for more information refer to table a 7. expansion bus timing in appendix a electrical characteristics . the length of the external e clock cycle to which the external device is synchronized can be stretched to accommodate devices that are slower than the mcu. 4.5.1 program chip select the program chip select (csprog ) is active in the range of memory where the main program exists. refer to figure 4-3 . when enabled, the csprog is active during address valid time and is an active-low signal. although the general-purpose chip select has priority over the program chip se- lect, csprog can be raised to a higher priority level by setting the gcspr bit in csctl register. bits in csctl enable the program chip select and determine its ad- dress range and priority level. bits in csstrh select from zero to three clock cycles of delay. 4.5.2 i/o chip selects the i/o chip selects (csio1 and csio2) are fixed in size and fill the remainder of the 4-kbyte block occupied by the register block. csio1 is mapped at $x060?x7ff and csio2 is mapped at $x800?xfff, where ??corresponds to the high-order nibble of the register block base address, represented by the value contained in reg[3:0] in the init register. bits in the csctl register determine the polarity of the active state and enable both i/ o chip selects. bits in csgsiz select whether each chip select is active for address- valid or e-valid time. bits in csstrh select from zero to three clock cycles of delay. refer to figure 4-3 .
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-19 figure 4-3 address map for i/o and program chip selects 4.5.3 general-purpose chip select the general-purpose chip select (csgen) is the most flexible and has the most con- trol bits. polarity of the active state, e-valid or address-valid timing, size, starting ad- dress, and clock delay are all programmable. a single bit in csctl selects a priority between csgen and csprog . bits in csg- siz select between address valid or e-clock valid timing, determine the polarity of the active state and the address range of csgen. the value contained in the csgadr register determines the starting address for csgen. depending on the size selected for csgen, some bits in csgadr will be invalid (don? cares). note that csgen is disabled when a size of zero is selected. refer to figure 4-4 . $0000 $1000 $ffff expanded mode $fe00 ffc0 ffff vectors 0000 ffff e000 c000 8000 x000 x05f 96-byte register block x060 x7ff i/o chip select 1 (csio1) x800 xfff i/o chip select 2 (csio2) remappable to 4-kbyte boundary $e000 $c000 $8000 psiz[a:b] = 0:0 64k psiz[a:b] = 0:1 32k psiz[a:b] = 1:0 16k psiz[a:b] = 1:1 8k program chip select (csprog )
motorola operating modes and on-chip memory MC68HC11F1 4-20 technical data figure 4-4 address map for general-purpose chip select io1sa?o1sb ?i/o chip select 1 clock stretch select refer to table 4-8 . io2sa?o2sb ?i/o chip select 2 clock stretch select refer to table 4-8 . gstha?sthb ?general-purpose chip select clock stretch select refer to table 4-8 . pstha?sthb ?program chip select clock stretch select refer to table 4-8 . csstrh ?chip select clock stretch select $105c bit 7 654321 bit 0 io1sa io1sb io2sa io2sb gstha gsthb pstha psthb reset: 0000000 0 table 4-8 chip select clock stretch control bit a bit b clock stretch selected 0 0 none 0 1 1 cycle 1 0 2 cycles 1 1 3 cycles $0000 $ffff exp mode addr space n/a ga15 ga[15:14] ga[15:13] ga[15:12] ga[15:11] ga[15:10] 0 : 1 : 1 1 : 0 : 0 1 : 0 : 1 1 : 1 : 0 0 : 0 : 0 0 : 0 : 1 0 : 1 : 0 valid base addr bits: gsiza : gsizb : gsizc: size: 8k 4k 2k 1k 64k 32k 16k note: these examples assume a starting address of $0000. ga[15:10] 1 : 1 : 1 disabled
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-21 *pcsen is set out of reset in expanded modes and cleared in single-chip modes. io1en ?i/o chip select 1 enable 0 = csio1 is disabled and port g bit 5 is general-purpose i/o. 1 = csio1 is enabled and uses port g bit 5. io1pl ?i/o chip select 1 polarity select 0 = csio1 active low 1 = csio1 active high io2en ?i/o chip select 2 enable 0 = csio2 is disabled and port g bit 4 is general-purpose i/o. 1 = csio2 is enabled and uses port g bit 4. io2pl ?i/o chip select 2 polarity select 0 = csio2 active low 1 = csio2 active high gcspr ?general-purpose chip select priority 0 = program chip select has priority over general-purpose chip select 1 = general-purpose chip select has priority over program chip select pcsen ?program chip select enable this bit is set out of reset in expanded modes and cleared in single-chip modes. 0 = csprog disabled and port g bit 7 available as general-purpose i/o 1 = csprog enabled out of reset and uses port g bit 7 pin psiza, psizb ?program chip select size (a or b) ga[15:10] ?general-purpose chip select base address ga[15:10] correspond to mcu address bits addr[15:10] and select the starting ad- dress of the general-purpose chip select's address range. which bits are valid de- pends upon the size selected by gsiza?sizc in csgsiz register. refer to the following table and to figure 4-4 . csctl ?chip select control $105d bit 7 654321 bit 0 io1en io1pl io2en io2pl gcspr pcsen* psiza psizb reset: 000000 0 table 4-9 program chip select size control psiza psizb size (bytes) address range 0 0 64 k $0000?ffff 0 1 32 k $8000?ffff 1 0 16 k $c000?ffff 1 1 8 k $e000?ffff csgadr ?general-purpose chip select address register $105e bit 7 654321 bit 0 ga15 ga14 ga13 ga12 ga11 ga10 reset: 0000000 0
motorola operating modes and on-chip memory MC68HC11F1 4-22 technical data io1av ?i/o chip select 1 address valid 0 = i/o chip select 1 is active during e-clock valid time (e-clock high) 1 = i/o chip select 1 is active during address valid time io2av ?i/o chip select 2 address valid 0 = i/o chip select 1 is active during e-clock valid time (e-clock high) 1 = i/o chip select 1 is active during address valid time gnpol ?general-purpose chip select polarity select 0 = csgen is active low 1 = csgen is active high gavld ?general-purpose chip select address valid select 0 = csgen is valid during e-clock valid time (e-clock high) 1 = csgen is valid during address valid time g1sza?1szc ?general-purpose chip select size refer to table 4-11 . table 4-10 general-purpose chip select starting address size (bytes) valid starting address bits 0 k (disabled) none 1 k ga[15:10] 2 k ga[15:11] 4 k ga[15:12] 8 k ga[15:13] 16 k ga[15:14] 32 k ga15 64 k none csgsiz ?general-purpose chip select size control $105f bit 7 654321 bit 0 io1av io2av gnpol gavld gsiza gsizb gsizc reset: 0000011 1 table 4-11 general-purpose chip select size control gsiza gsizb gsizc size (bytes) 0 0 0 64 k 0 0 1 32 k 0 1 0 16 k 0 1 1 8 k 100 4 k 101 2 k 110 1 k 1 1 1 0 k (disabled)
MC68HC11F1 operating modes and on-chip memory motorola technical data 4-23 table 4-12 chip select control parameter summary csio1 enable io1en in csctl ? 1 = on, off at reset (0) valid io1av in csgsiz ? 1 = address valid, 0 = e valid polarity io1pl in csctl ? 1 = active high, 0 = active low size fixed ? ($x060?x7ff) start address $x060 ? ??is determined by reg[3:0] in init stretch io1sa?o1sb in csstrh ?0, 1, 2, or 3 e clocks csio2 enable io2en in csctl ? 1 = on, off at reset (0) valid io2av in csgsiz ? 1 = address valid, 0 = e valid polarity io2pl in csctl ? 1 = active high, 0 = active low size fixed ? ($x800?xfff) start address $x800 ? ??is determined by reg[3:0] in init stretch io2sa?o2sb in csstrh ?0, 1, 2, or 3 e clocks csprog enable pcsen in csctl ? 1 = on, on after reset in expanded modes off after reset in single-chip modes valid fixed (address valid) polarity fixed (active low) size psiza?sizb 0:0 = 64k ($0000?ffff) in csctl 0:1 = 32k ($8000?ffff) 1:0 = 16k ($c000?ffff) 1:1 = 8k ($e000?ffff) start address fixed (determined by size) stretch pstha?sthb in csstrh ?0, 1, 2, or 3 e clocks 1 cycle after reset in expanded mode no delay after reset in all other modes priority gcspr in csctl ? 1 = csgen above csprog 0 = csprog above csgen csgen enable set size to 0k to disable ? 1 = csgen above csprog 0 = csprog above csgen valid gavld in csgsiz ? address valid or e valid polarity gnpol in csgsiz ? active high or low size gsiza?sizc in csgsiz ? refer to table 4?2 start address ga[15:10] in csgadr stretch gstha?sthb in csstrh ?0, 1, 2, or 3 e clocks
motorola operating modes and on-chip memory MC68HC11F1 4-24 technical data
MC68HC11F1 resets and interrupts motorola technical data 5-1 section 5 resets and interrupts resets and interrupt operations load the program counter with a vector that points to a new location from which instructions are to be fetched. a reset causes the internal control registers to be initialized to a known state. the program counter is loaded with a known starting address and execution of instructions begins. an interrupt temporarily suspends normal program execution while an interrupt service routine is being execut- ed. after an interrupt has been serviced, the main program resumes as if there had been no interruption. 5.1 resets there are four possible sources of reset. power-on reset (por) and external reset share the normal reset vector. the computer operating properly (cop) reset and the clock monitor reset each has its own vector. 5.1.1 power-on reset a positive transition on v dd generates a power-on reset (por), which is used only for power-up conditions. por cannot be used to detect drops in power supply voltages. a 4064 t cyc (internal clock cycle) delay after the oscillator becomes active allows the clock generator to stabilize. if reset is at logical zero at the end of 4064 t cyc , the cpu remains in the reset condition until reset goes to logical one. it is important to protect the mcu during power transitions. to protect data in ee- prom, m68hc11 systems need an external circuit that holds the reset pin low whenever v dd is below the minimum operating level. this external voltage level de- tector, or other external reset circuits, are the usual source of reset in a system. the por circuit only initializes internal circuitry during cold starts. refer to figure 2?. 5.1.2 external reset (reset ) the cpu distinguishes between internal and external reset conditions by sensing whether the reset pin rises to a logic one in less than two e-clock cycles after an inter- nal device releases reset. when a reset condition is sensed, the reset pin is driven low by an internal device for four e-clock cycles, then released. two e-clock cycles later it is sampled. if the pin is still held low, the cpu assumes that an external reset has occurred. if the pin is high, it indicates that the reset was initiated internally by ei- ther the cop system or the clock monitor. it is not advisable to connect an external resistor capacitor (rc) power-up delay circuit to the reset pin of m68hc11 devices be- cause the circuit charge time constant can cause the device to misinterpret the type of reset that occurred.
motorola resets and interrupts MC68HC11F1 5-2 technical data 5.1.3 computer operating properly (cop) reset the mcu includes a cop system to help protect against software failures. when the cop is enabled, the software is responsible for keeping a free-running watchdog timer from timing out. when the software is no longer being executed in the intended se- quence, a system reset is initiated. the state of the nocop bit in the config register determines whether the cop sys- tem is enabled or disabled. to change the enable status of the cop system, change the contents of the config register and then perform a system reset. in the special test and bootstrap operating modes, the cop system is initially inhibited by the disable resets (disr) control bit in the test1 register. the disr bit can subsequently be writ- ten to zero to enable cop resets. the cop timer rate control bits cr[1:0] in the option register determine the cop time-out period. the system e clock is divided by the values shown in table 5-1 . after reset, these bits are zero, which selects the fastest time-out period. in normal operat- ing modes, these bits can only be written once within 64 bus cycles after reset. complete the following reset sequence to service the cop timer. write $55 to co- prst to arm the cop timer clearing mechanism. then write $aa to coprst to clear the cop timer. performing instructions between these two steps is possible as long as both steps are completed in the correct sequence before the timer times out. 5.1.4 clock monitor reset the clock monitor circuit is based on an internal rc time delay. if no mcu clock edges are detected within this rc time delay, the clock monitor can optionally generate a sys- tem reset. the clock monitor function is enabled or disabled by the cme and fcme control bits in the option register. the presence of a time-out is determined by the rc delay, which allows the clock monitor to operate without any mcu clocks. clock monitor is used as a backup for the cop system. because the cop needs a clock to function, it is disabled when the clocks stop. therefore, the clock monitor sys- tem can detect clock failures not detected by the cop system. table 5-1 cop timer rate selection cr[1:0] divide e by xtal = 8.0 mhz time- out ? ms, +16.4 ms xtal = 12.0 mhz time-out ? ms, +10.9 ms xtal = 16.0 mhz time-out ? ms, +8.2 ms 0 0 2 15 16.384 ms 10.923 ms 8.192 ms 0 1 2 17 65.536 ms 43.691 ms 32.768 ms 1 0 2 19 262.14 ms 174.76 ms 131.07 ms 1 1 2 21 1.049 s 699.05 ms 524.29 ms e = 2.0 mhz 3.0 mhz 4.0 mhz coprst ?arm/reset cop timer circuitry $103a bit 7 654321 bit 0 7654321 0 reset: 0000000 0
MC68HC11F1 resets and interrupts motorola technical data 5-3 semiconductor wafer processing causes variations of the rc time-out values between individual devices. an e-clock frequency below 10 khz is detected as a clock monitor error. an e-clock frequency of 200 khz or more prevents clock monitor errors. using the clock monitor function when the e-clock is below 200 khz is not recommended. special considerations are needed when a stop instruction is executed and the clock monitor is enabled. because the stop function causes the clocks to be halted, the clock monitor function generates a reset sequence if it is enabled at the time the stop mode was initiated. before executing a stop instruction, clear to zero the cme bit in the option register to disable the clock monitor. after recovery from stop, set the cme bit to logic one to enable the clock monitor. 5.1.5 option register *can be written only once in first 64 cycles out of reset in normal modes, or at any time in special modes. adpu ?analog-to-digital converter power-up refer to section 10 analog-to-digital converter . csel ?clock select refer to section 10 analog-to-digital converter . irqe ?configure irq for edge-sensitive only operation 0 = low level sensitive operation. 1 = falling edge sensitive only operation. dly ?enable oscillator start-up delay 0 = the oscillator start-up delay coming out of stop is bypassed and the mcu re- sumes processing within about four bus cycles. 1 = a delay of approximately 4000 e-clock cycles is imposed as the mcu is started up from the stop power-saving mode. cme ?clock monitor enable this control bit can be read or written at any time and controls whether or not the in- ternal clock monitor circuit triggers a reset sequence when the system clock is slow or absent. when it is clear, the clock monitor circuit is disabled, and when it is set, the clock monitor circuit is enabled. reset clears the cme bit. fcme ?force clock monitor enable to use stop mode, the fcme bit must equal zero. 0 = clock monitor follows the state of the cme bit. 1 = clock monitor circuit is enabled until next reset option ?system configuration options $1039 bit 7 654321 bit 0 adpu csel irqe* dly* cme fcme* cr1* cr0* reset: 0001000 0
motorola resets and interrupts MC68HC11F1 5-4 technical data cr[1:0] ?cop timer rate select the internal e clock is first divided by 2 15 before it enters the cop watchdog system. these control bits determine a scaling factor for the watchdog timer. refer to table 5- 1 . 5.1.6 config register p indicates a previously programmed bit. p(l) indicates that the bit resets to the logic level held in the latch prior to reset, but the function of cop is controlled by disr in test1 register. ee[3:0] ?eeprom mapping control refer to section 4 operating modes and on-chip memory . bit 3 ?not implemented always reads one nocop ?cop system disable 0 = cop system enabled (forces reset on time-out) 1 = cop system disabled bit 1 ?not implemented always reads one eeon ?eeprom enable refer to section 4 operating modes and on-chip memory . 5.2 effects of reset when a reset condition is recognized, the internal registers and control bits are forced to an initial state. depending on the cause of the reset and the operating mode, the reset vector can be fetched from any of six possible locations. refer to table 5-2 . these initial states then control on-chip peripheral systems to force them to known start-up states, as follows: config ?system configuration register $103f bit 7 654321 bit 0 ee3 ee2 ee1 ee0 nocop eeon reset: 11111p11 single chip 11111 p(l) 1 1 bootstrap pppp1p1p expanded pppp1 p(l) 1 0 special test table 5-2 reset cause, operating mode, and reset vector cause of reset normal mode vector special test or bootstrap por or reset pin $fffe, ffff $bffe, $bfff clock monitor failure $fffc, fffd $bffc, $bffd cop watchdog time-out $fffa, fffb $bffa, $bffb
MC68HC11F1 resets and interrupts motorola technical data 5-5 5.2.1 central processing unit after reset, the cpu fetches the reset vector from the appropriate address during the first three cycles, and begins executing instructions. the stack pointer and other cpu registers are indeterminate immediately after reset; however, the x and i interrupt mask bits in the condition code register (ccr) are set to mask any interrupt requests. also, the s bit in the ccr is set to inhibit the stop mode. 5.2.2 memory map after reset, the init register is initialized to $01, putting the 1024 bytes of ram at lo- cations $0000 through $03ff, and the control registers at locations $1000 through $105f. the ee[3:0] bits in the config register control the location of the 512-byte eeprom array. 5.2.3 parallel i/o when a reset occurs in expanded operating modes, port b, c, and f pins used for par- allel i/o are dedicated to the expansion bus. if a reset occurs during a single-chip op- erating mode, all ports are configured as general-purpose high-impedance inputs. note do not confuse pin function with the electrical state of the pin at reset. all general-purpose i/o pins configured as inputs at reset are in a high-impedance state. port data registers reflect the port's functional state at reset. the pin function is mode dependent. 5.2.4 timer during reset, the timer system is initialized to a count of $0000. the prescaler bits are cleared, and all output compare registers are initialized to $ffff. all input capture reg- isters are indeterminate after reset. the output compare 1 mask (oc1m) register is cleared so that successful oc1 compares do not affect any i/o pins. the other four output compares are configured so that they do not affect any i/o pins on successful compares. all input capture edge-detector circuits are configured for capture disabled operation. the timer overflow interrupt flag and all eight timer function interrupt flags are cleared. all nine timer interrupts are disabled because their mask bits have been cleared. the i4/o5 bit in the pactl register is cleared to configure the i4/o5 function as oc5; however, the om5?l5 control bits in the tctl1 register are clear so oc5 does not control the pa3 pin. 5.2.5 real-time interrupt (rti) the real-time interrupt flag (rtif) is cleared and automatic hardware interrupts are masked. the rate control bits are cleared after reset and can be initialized by software before the real-time interrupt (rti) system is used.
motorola resets and interrupts MC68HC11F1 5-6 technical data 5.2.6 pulse accumulator the pulse accumulator system is disabled at reset so that the pulse accumulator input (pai) pin defaults to being a general-purpose input pin. 5.2.7 computer operating properly (cop) the cop watchdog system is enabled if the nocop control bit in the config regis- ter is cleared, and disabled if nocop is set. the cop rate is set for the shortest du- ration time-out. 5.2.8 serial communications interface (sci) the reset condition of the sci system is independent of the operating mode. all trans- mit and receive interrupts are masked and both the transmitter and receiver are dis- abled so the port pins default to being general-purpose i/o lines. the sci frame format is initialized to an 8-bit character size. the send break and receiver wakeup functions are disabled. the tdre and tc status bits in the sci status register are both set, in- dicating that there is no transmit data in either the transmit data register or the transmit serial shift register. the rdrf, idle, or, nf, fe, pf, and raf receive-related status bits are cleared. 5.2.9 serial peripheral interface (spi) the spi system is disabled by reset. the port pins associated with this function default to being general-purpose i/o lines. 5.2.10 analog-to-digital converter the a/d converter configuration is indeterminate after reset. the adpu bit is cleared by reset, which disables the a/d system. the conversion complete flag is cleared by reset. 5.2.11 system the eeprom programming controls are disabled, so the memory system is config- ured for normal read operation. psel[3:0] are initialized with the binary value %0101, causing the external irq pin to have the highest i-bit interrupt priority. the irq pin is configured for level-sensitive operation (for wired-or systems). the rboot, smod, and mda bits in the hprio register reflect the status of the modb and moda inputs at the rising edge of reset. the dly control bit is set to specify that an oscillator start- up delay is imposed upon recovery from stop mode. the clock monitor system is dis- abled because cme and fcme are cleared. 5.3 reset and interrupt priority resets and interrupts have a hardware priority that determines which reset or interrupt is serviced first when simultaneous requests occur. any maskable interrupt can be giv- en priority over other maskable interrupts. the first six interrupt sources are not maskable. the priority arrangement for these sources is as follows:
MC68HC11F1 resets and interrupts motorola technical data 5-7 1. por or reset pin 2. clock monitor reset 3. cop watchdog reset 4. xirq interrupt 5. illegal opcode interrupt 6. software interrupt (swi) the maskable interrupt sources have the following priority arrangement: 1. irq 2. real-time interrupt 3. timer input capture 1 4. timer input capture 2 5. timer input capture 3 6. timer output compare 1 7. timer output compare 2 8. timer output compare 3 9. timer output compare 4 10. timer input capture 4/output compare 5 11. timer overflow 12. pulse accumulator overflow 13. pulse accumulator input edge 14. spi transfer complete 15. sci system (refer to figure 5-5 ) any one of these interrupts can be assigned the highest maskable interrupt priority by writing the appropriate value to the psel bits in the hprio register. otherwise, the priority arrangement remains the same. an interrupt that is assigned highest priority is still subject to global masking by the i bit in the ccr, or by any associated local bits. interrupt vectors are not affected by priority assignment. to avoid race conditions, hp- rio can only be written while i-bit interrupts are inhibited. 5.3.1 highest priority interrupt and miscellaneous register *the values of the rboot, smod, mda, and irv reset bits depend on the operating mode selected during power- up. refer to table 4?. rboot ?read bootstrap rom set to one out of reset in bootstrap mode. valid while in special modes only. can be read any time. can only be written in special modes. refer to section 4 operat- ing modes and on-chip memory for more information. hprio ?highest priority i-bit interrupt and miscellaneous $103c bit 7 654321 bit 0 rboot* smod* mda* irv psel3 psel2 psel1 psel0 reset: 0 0 000101 single chip 00110101 expanded 11000101 bootstrap 01110101 special test
motorola resets and interrupts MC68HC11F1 5-8 technical data smod ?special mode select can be read any time. can only be written in special modes (smod = 1). can only be written to zero. refer to section 4 operating modes and on-chip memory for more information. mda ?mode select a can be read any time. can only be written in special modes (smod = 1). refer to section 4 operating modes and on-chip memory for more information. irv ?internal read visibility the irv control bit allows internal read accesses to be available on the external data bus during operation in expanded modes. in special modes (smod = 1), irv resets to one (enabled) and can be written any time. in normal modes (smod = 0), irv re- sets to zero (disabled) and only one write is allowed. psel[3:0] ?priority select bits these bits select one interrupt source to be elevated above all other i-bit-related sources and can only be written while the i bit in the ccr is set (interrupts disabled). 5.4 interrupts the mcu has 18 interrupt vectors that support 22 interrupt sources. the 15 maskable interrupts are generated by on-chip peripheral systems. these interrupts are recog- nized when the global interrupt mask bit (i) in the condition code register (ccr) is clear. the three non-maskable interrupt sources are illegal opcode trap, software in- terrupt, and xirq pin. refer to table 5-4 , which shows the interrupt sources and vec- tor assignments for each source. table 5-3 highest priority interrupt selection psel3 psel2 psel1 psel0 interrupt source promoted 0000 timer overflow 0001 pulse accumulator overflow 0010 pulse accumulator input edge 0011 spi serial transfer complete 0100 sci serial system 0101 reserved (default to irq ) 0110irq 0111 real-time interrupt 1000 timer input capture 1 1001 timer input capture 2 1010 timer input capture 3 1011 timer output compare 1 1100 timer output compare 2 1101 timer output compare 3 1110 timer output compare 4 1111 timer output compare 5/input capture 4
MC68HC11F1 resets and interrupts motorola technical data 5-9 for some interrupt sources, such as the sci interrupts, the flags are automatically cleared during the normal course of responding to the interrupt requests. for example, the rdrf flag in the sci system is cleared by the automatic clearing mechanism con- sisting of a read of the sci status register while rdrf is set, followed by a read of the sci data register. the normal response to an rdrf interrupt request would be to read the sci status register to check for receive errors, then to read the received data from the sci data register. these two steps satisfy the automatic clearing mechanism with- out requiring any special instructions. 5.4.1 interrupt recognition and register stacking an interrupt can be recognized at any time after it is enabled by its local mask, if any, and by the global mask bit in the ccr. once an interrupt source is recognized, the cpu responds at the completion of the instruction being executed. interrupt latency varies according to the number of cycles required to complete the current instruction. when the cpu begins to service an interrupt, the contents of the cpu registers are pushed onto the stack in the order shown in table 5-5 . after the ccr value is stacked, the i bit and the x bit (if xirq is pending) are set to inhibit further interrupts. the inter- rupt vector for the highest priority pending source is fetched, and execution continues table 5-4 interrupt and reset vector assignments vector address interrupt source ccr mask bit local mask ffc0, c1 ?ffd4, d5 reserved ffd6, d7 sci serial system i ?sci receive data register full rie ?sci receiver overrun rie ?sci transmit data register empty tie ?sci transmit complete tcie ?sci idle line detect ilie ffd8, d9 spi serial transfer complete i spie ffda, db pulse accumulator input edge i paii ffdc, dd pulse accumulator overflow i paovi ffde, df timer overflow i toi ffe0, e1 timer input capture 4/output compare 5 i i4/o5i ffe2, e3 timer output compare 4 i oc4i ffe4, e5 timer output compare 3 i oc3i ffe6, e7 timer output compare 2 i oc2i ffe8, e9 timer output compare 1 i oc1i ffea, eb timer input capture 3 i ic3i ffec, ed timer input capture 2 i ic2i ffee, ef timer input capture 1 i ic1i fff0, f1 real-time interrupt i rtii fff2, f3 irq i none fff4, f5 xirq pin x none fff6, f7 software interrupt none none fff8, f9 illegal opcode trap none none fffa, fb cop failure none nocop fffc, fd clock monitor fail none cme fffe, ff reset none none
motorola resets and interrupts MC68HC11F1 5-10 technical data at the address specified by the vector. at the end of the interrupt service routine, the return from interrupt instruction is executed and the saved registers are pulled from the stack in reverse order so that normal program execution can resume. refer to sec- tion 3 central processing unit for further information. 5.4.2 non-maskable interrupt request (xirq ) non-maskable interrupts are useful because they can always interrupt cpu opera- tions. the most common use for such an interrupt is for serious system problems, such as program runaway or power failure. the xirq input is an updated version of the nmi input of earlier mcus. upon reset, both the x bit and i bit of the ccr are set to inhibit all maskable interrupts and xirq . after minimum system initialization, software can clear the x bit by a tap instruction, enabling xirq interrupts. thereafter, software cannot set the x bit. thus, an xirq interrupt is a nonmaskable interrupt. because the operation of the i-bit-relat- ed interrupt structure has no effect on the x bit, the internal xirq pin remains non- masked. in the interrupt priority logic, the xirq interrupt has a higher priority than any source that is maskable by the i bit. all i-bit-related interrupts operate normally with their own priority relationship. when an i-bit-related interrupt occurs, the i bit is automatically set by hardware after stacking the ccr byte. the x bit is not affected. when an x-bit-related interrupt oc- curs, both the x and i bits are automatically set by hardware after stacking the ccr. a return from interrupt instruction restores the x and i bits to their pre-interrupt request state. 5.4.3 illegal opcode trap because not all possible opcodes or opcode sequences are defined, the mcu in- cludes an illegal opcode detection circuit, which generates an interrupt request. when an illegal opcode is detected and the interrupt is recognized, the current value of the program counter is stacked. after interrupt service is complete, reinitialize the stack pointer so repeated execution of illegal opcodes does not cause stack underflow. left uninitialized, the illegal opcode vector can point to a memory location that contains an illegal opcode. this condition causes an infinite loop that causes stack underflow. the stack grows until the system crashes. table 5-5 stacking order on entry to interrupts memory location cpu registers sp pcl sp ?1 pch sp ?2 iyl sp ?3 iyh sp ?4 ixl sp ?5 ixh sp ?6 acca sp ?7 accb sp ?8 ccr
MC68HC11F1 resets and interrupts motorola technical data 5-11 the illegal opcode trap mechanism works for all unimplemented opcodes on all four opcode map pages. the address stacked as the return address for the illegal opcode interrupt is the address of the first byte of the illegal opcode. otherwise, it would be almost impossible to determine whether the illegal opcode had been one or two bytes. the stacked return address can be used as a pointer to the illegal opcode so the illegal opcode service routine can evaluate the offending opcode. 5.4.4 software interrupt swi is an instruction, and thus cannot be interrupted until complete. swi is not inhib- ited by the global mask bits in the ccr. because execution of swi sets the i mask bit, once an swi interrupt begins, other interrupts are inhibited until swi is complete, or until user software clears the i bit in the ccr. 5.4.5 maskable interrupts the maskable interrupt structure of the mcu can be extended to include additional ex- ternal interrupt sources through the irq pin. the default configuration of this pin is a low-level sensitive wired-or network. when an event triggers an interrupt, a software accessible interrupt flag is set. when enabled, this flag causes a constant request for interrupt service. after the flag is cleared, the service request is released. 5.4.6 reset and interrupt processing figure 5-1 and figure 5-3 illustrate the reset and interrupt process. figure 5-1 illus- trates how the cpu begins from a reset and how interrupt detection relates to normal opcode fetches. figure 5-3 is an expansion of a block in figure 5-1 and illustrates in- terrupt priorities. figure 5-5 shows the resolution of interrupt sources within the sci subsystem.
motorola resets and interrupts MC68HC11F1 5-12 technical data figure 5-1 processing flow out of reset (1 of 2) cop watchdog timeout x bit in ccr set ? 1b 1a highest lowest power-on reset (por) external reset clock monitor fail (with cme = 1) (with nocop = 0) load program counter with contents of $fffa, fffb (vector fetch) delay 4064 e cycles set s, x, and i bits in ccr reset mcu hardware begin an instruction sequence stack cpu registers set x and i bits fetch vector $ffe4, ffe5 yes yes no load program counter with contents of $fffc, fffd (vector fetch) load program counter with contents of $fffe, ffff (vector fetch) priority xirq pin low ? no
MC68HC11F1 resets and interrupts motorola technical data 5-13 figure 5-2 processing flow out of reset (2 of 2) any i bit interrupt pending ? stack cpu registers set x and i bits fetch vector $ffe6, ffe7 yes 1a 1b yes no stack cpu registers set x and i bits fetch vector $ffe8, ffe9 fetch opcode stack cpu registers stack cpu registers set i bit execute this instruction restore cpu registers from stack resolve interrupt priority and fetch vector for highest pending source (refer to figure 5-2) start next instruction sequence yes yes yes yes yes no i bit in ccr set ? no illegal opcode ? no wai ? no swi ? no rti ? no interrupt yet ?
motorola resets and interrupts MC68HC11F1 5-14 technical data figure 5-3 interrupt priority resolution (1 of 2) 2a 2b yes no fetch vector $fff4, fff5 yes no xirq pin low ? yes no yes no irq ? fetch vector $fff2, fff3 yes no rtii = 1 ? fetch vector $fff0, fff1 yes no real-time interrupt ? yes no ic1i = 1 ? fetch vector $ffee, ffef yes no timer ic1f ? yes no ic2i = 1 ? fetch vector $ffec, ffed yes no yes no ic3i = 1 ? fetch vector $ffea, ffeb yes no yes no oc1i = 1 ? fetch vector $ffe8, ffe9 yes no timer oc1f ? begin set x bit in ccr fetch vector timer ic3f ? timer ic2f ? x bit in ccr set ? priority interrupt ? highest
MC68HC11F1 resets and interrupts motorola technical data 5-15 figure 5-4 interrupt priority resolution (2 of 2) 2a 2b end yes no oc2i = 1 ? fetch vector $ffe6, ffe7 yes no timer oc2f ? yes no oc3i = 1 ? fetch vector $ffe4, ffe5 yes no timer oc3f ? yes no oc4i = 1 ? fetch vector $ffe2, ffe3 yes no timer oc4f ? yes no oc5/ic4i = 1 ? fetch vector $ffe0, ffe1 yes no timer oc5/ic4f ? yes no toi = 1 ? fetch vector $ffde, ffdf yes no timer tof ? yes no paovi = 1 ? fetch vector $ffdc, ffdd yes no yes no paii = 1 ? fetch vector $ffda, ffdb yes no accumulator paif ? yes no spie = 1 ? fetch vector $ffd8, ffd9 yes no spif or modf ? yes no fetch vector $ffd6, ffd7 fetch vector $fff2, fff3 sci (refer to fig 5-3) ? spurious interrupt ?take irq vector pulse accumulator paovf ? pulse
motorola resets and interrupts MC68HC11F1 5-16 technical data figure 5-5 interrupt source resolution within sci 5.5 low power operation both stop and wait suspend cpu operation until a reset or interrupt occurs. the wait condition suspends processing and reduces power consumption to an interme- diate level. the stop condition turns off all on-chip clocks and reduces power con- sumption to an absolute minimum while retaining the contents of all 1024 bytes of ram. yes no rdrf = 1 ? no ?valid sci request begin yes no yes no or = 1 ? rie = 1 ? yes no re = 1 ? yes no yes no tdre = 1 ? tie = 1 ? yes no te = 1 ? yes no yes no tc = 1 ? tcie = 1 ? yes no yes no idle = 1 ? ilie = 1 ? yes no re = 1 ? yes ?valid sci request
MC68HC11F1 resets and interrupts motorola technical data 5-17 5.5.1 wait the wai opcode places the mcu in the wait condition, during which the cpu regis- ters are stacked and cpu processing is suspended until a qualified interrupt is detect- ed. the interrupt can be an external irq , an xirq , or any of the internally generated interrupts, such as the timer or serial interrupts. the on-chip crystal oscillator remains active throughout the wait standby period. the reduction of power in the wait condition depends on how many internal clock sig- nals driving on-chip peripheral functions can be shut down. the cpu is always shut down during wait. while in the wait state, the address/data bus repeatedly runs read cycles to the address where the ccr contents were stacked. ensuring that the stack contents are placed in internal ram will further reduce power consumption. the mcu leaves the wait state when it senses any interrupt that has not been masked. the free-running timer system is shut down only if the i bit is set to one and the cop system is disabled by nocop being set to one. several other systems can also be in a reduced power consumption state depending on the state of software-controlled configuration control bits. power consumption by the analog-to-digital (a/d) converter is not affected significantly by the wait condition. however, the a/d converter current can be eliminated by writing the adpu bit to zero. the spi system is enabled or dis- abled by the spe control bit. the sci transmitter is enabled or disabled by the te bit, and the sci receiver is enabled or disabled by the re bit. therefore the power con- sumption in wait is dependent on the particular application. 5.5.2 stop executing the stop instruction while the s bit in the ccr is equal to zero places the mcu in the stop condition. if the s bit is not zero, the stop opcode is treated as a no-op (nop). the stop condition offers minimum power consumption because all clocks, including the crystal oscillator, are stopped while in this mode. to exit stop and resume normal processing, a logic low level must be applied to one of the external interrupts (irq or xirq ) or to the reset pin. a pending edge-triggered irq can also bring the cpu out of stop. because all clocks are stopped in this mode, all internal peripheral functions also stop. the data in the internal ram is retained as long as v dd power is maintained. the cpu state and i/o pin levels are static and are unchanged by stop. therefore, when an interrupt restarts the system, the mcu resumes processing as if there were no inter- ruption. if reset is used to restart the system a normal reset sequence results where all i/o pins and functions are also restored to their initial states. to use the irq pin as a means of recovering from stop, the i bit in the ccr must be clear (irq not masked). the xirq pin can be used to wake up the mcu from stop regardless of the state of the x bit in the ccr, although the recovery sequence de- pends on the state of the x bit. if x is set to zero (xirq not masked), the mcu starts up, beginning with the stacking sequence leading to normal service of the xirq re- quest. if x is set to one (xirq masked or inhibited), then processing continues with the instruction that immediately follows the stop instruction, and no xirq interrupt service is requested or pending.
motorola resets and interrupts MC68HC11F1 5-18 technical data because the oscillator is stopped in stop mode, a restart delay may be imposed to allow oscillator stabilization upon leaving stop. if the internal oscillator is being used, this delay is required; however, if a stable external oscillator is being used, the dly control bit can be used to bypass this start-up delay. the dly control bit is set by reset and can be optionally cleared during initialization. if the dly equal to zero option is used to avoid start-up delay on recovery from stop, then reset should not be used as the means of recovering from stop, as this causes dly to be set again by reset, im- posing the restart delay. this same delay also applies to power-on reset, regardless of the state of the dly control bit, but does not apply to a reset while the clocks are running.
MC68HC11F1 parallel input/output motorola technical data 6-1 section 6 parallel input/output the MC68HC11F1 mcu has up to 54 input/output lines, depending on the operating mode. the data bus of this microcontroller is nonmultiplexed. i/o lines are organized into seven parallel ports. ports with bidirectional pins have an associated data direc- tion control register. this register (ddrx) contains a data direction control bit for each bidirectional port line. the following table is a summary of the configuration and fea- tures of each port. port pin function is mode dependent. do not confuse pin function with the electrical state of the pin at reset. port pins are either driven to a specified logic level or are con- figured as high impedance inputs. i/o pins configured as high-impedance inputs have port data that is indeterminate. the contents of the corresponding latches are depen- dent upon the electrical state of the pins during reset. in port descriptions, an ??indi- cates this condition. port pins that are driven to a known logic level during reset are shown with a value of either one or zero. some control bits are unaffected by reset. reset states for these bits are indicated with a ?? 6.1 port a port a has eight bidirectional i/o pins and shares functions with the timer system. table 6-1 i/o port configuration port input pins output pins bidirectional pins shared functions port a 8 timer port b 8 high-order address port c 8 data bus port d 6 sci and spi port e 8 a/d converter port f 8 low-order address port g 8 chip select outputs porta ?port a data $1000 bit 7 654321 bit 0 pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 reset: iiiiiii i alt. pin func.: pai oc2 oc3 oc4 ic4/oc5 ic1 ic2 ic3 and/or: oc1 oc1 oc1 oc1 oc1
motorola parallel input/output MC68HC11F1 6-2 technical data dda[7:0] ?data direction for port a 0 = input 1 = output note to enable pa3 as fourth input capture, set the i4/o5 bit in the pactl register. otherwise, pa3 is configured as a fifth output compare out of reset, with bit i4/o5 being cleared. if the dda3 bit is set (configur- ing pa3 as an output), and ic4 is enabled, writes to pa3 cause edges on the pin to result in input captures. writing to ti4/o5 has no effect when the ti4/o5 register is acting as ic4. pa7 drives the pulse ac- cumulator input but also can be configured for general-purpose i/o, or output compare. note that even when pa7 is configured as an out- put, the pin still drives the pulse accumulator input. 6.2 port b reset state is mode dependent. in single-chip or bootstrap modes, port b pins are general-purpose outputs. in expanded and test modes, port b pins are high-order ad- dress outputs and portb is not in the memory map. 6.3 port c reset state is mode dependent. in single-chip and bootstrap modes, port c pins are high-impedance inputs. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. in expanded or test modes, port c pins are data bus inputs/outputs and portc is not in the memory map. the r/w signal is used to con- trol the direction of data transfers. the cwom control bit in the opt2 register disables port c's p-channel output drivers. because the n-channel driver is not affected by cwom, setting cwom causes port c to become an open-drain-type output port suitable for wired-or operation. in wired- or mode, (portc bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port c bit is at logic level one, the associated pin is in a high- ddra ?data direction register for port a $1001 bit 7 654321 bit 0 dda7 dda6 dda5 dda4 dda3 dda2 dda1 dda0 reset: 0000000 0 portb ?port b data $1004 bit 7 654321 bit 0 pb7 pb6 pb5 pb4 pb3 pb2 pb1 pb0 s. chip or boot: pb7 pb6 pb5 pb4 pb3 pb2 pb1 pb0 reset: 0000000 0 expan. or test: addr15 addr14 addr13 addr12 addr11 addr10 addr9 addr8
MC68HC11F1 parallel input/output motorola technical data 6-3 impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port c can only be configured for wired-or operation when the mcu is in sin- gle-chip or bootstrap modes. ddc[7:0] ?data direction for port c 0 = input 1 = output 6.4 port d in all modes, port d bits [5:0] can be used either for general-purpose i/o, or with the sci and spi subsystems. during reset, port d pins are configured as high impedance inputs (ddrd bits cleared). the dwom control bit in the spcr register disables port d? p-channel output drivers. because the n-channel driver is not affected by dwom, setting dwom causes port d to become an open-drain-type output port suitable for wired-or operation. in wired- or mode, (portd bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port d bit is at logic level one, the associated pin is in a high- impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port d can be configured for wired-or operation in any operating mode. portc ?port c data $1006 bit 7 654321 bit 0 pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 s. chip or boot: pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 reset: iiiiiii i expan. or test: data7 data6 data5 data4 data3 data2 data1 data0 ddrc ?data direction register for port c $1007 bit 7 654321 bit 0 ddc7 ddc6 ddc5 ddc4 ddc3 ddc2 ddc1 ddc0 reset: 0000000 0 portd ?port d data $1008 bit 7 654321 bit 0 pd5 pd4 pd3 pd2 pd1 pd0 reset: 0 0 iiiii i alt. pin func.: ? ? ss sck mosi miso txd rxd
motorola parallel input/output MC68HC11F1 6-4 technical data bits [7:6] ?not implemented always read zero ddd[5:0] ?data direction for port d 0 = input 1 = output note when the spi system is in slave mode, ddd5 has no meaning nor effect. when the spi system is in master mode, ddd5 determines whether bit 5 of portd is an error detect input (ddd5 = 0) or a gen- eral-purpose output (ddd5 = 1). if the spi system is enabled and ex- pects any of bits [4:2] to be an input, that bit will be an input regardless of the state of the associated ddr bit. if any of bits [4:2] are expected to be outputs that bit will be an output only if the asso- ciated ddr bit is set. 6.5 port e port e has eight general-purpose input pins and shares functions with the a/d convert- er system. when some port e pins are being used for general-purpose input and oth- ers are being used as a/d inputs, porte should not be read during the sample portion of an a/d conversion. 6.6 port f reset state is mode dependent. in single-chip or bootstrap modes, port f pins are gen- eral-purpose outputs. in expanded and test modes, port f pins are low order address outputs and portf is not in the memory map. ddrd ?data direction register for port d $1009 bit 7 654321 bit 0 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 reset: 0000000 0 porte ?port e data $100a bit 7 654321 bit 0 pe7 pe6 pe5 pe4 pe3 pe2 pe1 pe0 reset: iiiiiii i alt. pin func.: an7 an6 an5 an4 an3 an2 an1 an0
MC68HC11F1 parallel input/output motorola technical data 6-5 6.7 port g port g pins reset to high-impedance inputs except in expanded modes where reset causes pg7 to become the csprog output. alternate functions for port g bits [7:4] are chip select outputs. all port g bits are bidirectional and have corresponding data direction bits. the gwom control bit in the opt2 register disables port g's p-channel output drivers. because the n-channel driver is not affected by gwom, setting gwom causes port g to become an open-drain-type output port suitable for wired-or operation. in wired- or mode, (portg bits are at logic level zero), pins are actively driven low by the n- channel driver. when a port g bit is at logic level one, the associated pin is in a high- impedance state, as neither the n-channel nor the p-channel devices are active. it is customary to have an external pull-up resistor on lines that are driven by open-drain devices. port g can be configured for wired-or operation in any operating mode. ddg[7:0] ?data direction for port g 0 = input 1 = output 6.8 system configuration options 2 the system configuration options 2 register controls several configuration parameters. bit 6, cwom, is the only bit in this register that directly affects parallel i/o. portf ?port f data $1005 bit 7 654321 bit 0 pf7 pf6 pf5 pf4 pf3 pf2 pf1 pf0 s. chip or boot: pf7 pf6 pf5 pf4 pf3 pf2 pf1 pf0 reset: 0000000 0 expan. or test: addr7 addr6 addr5 addr4 addr3 addr2 addr1 addr0 portg ?port g data $1002 bit 7 654321 bit 0 pg7 pg6 pg5 pg4 pg3 pg2 pg1 pg0 reset: iiiiiii i alt. pin func.: csprog csgen csio1 csio2 ddrg ?data direction register for port g $1003 bit 7 654321 bit 0 ddg7 ddg6 ddg5 ddg4 ddg3 ddg2 ddg1 ddg0 reset: 0000000 0
motorola parallel input/output MC68HC11F1 6-6 technical data gwom ?port g wired-or mode 0 = port g operates normally 1 = port g outputs are open drain cwom ?port c wired-or mode 0 = port c operates normally 1 = port c outputs are open drain clk4x ?4xout clock enable refer to section 2 pin descriptions . bits [4:0] ?not implemented always read zero opt2 ?system configuration options 2 $1038 bit 7 654321 bit 0 gwom cwom clk4x reset: 0010000 0
MC68HC11F1 serial communications interface motorola technical data 7-1 section 7 serial communications interface the serial communications interface (sci) is a universal asynchronous receiver trans- mitter (uart), one of two independent serial i/o subsystems in the MC68HC11F1 mcu. it has a standard nonreturn to zero (nrz) format (one start bit, eight or nine data bits, and one stop bit). several baud rates are available. the sci transmitter and re- ceiver are independent, but use the same data format and bit rate. 7.1 data format the serial data format requires the following conditions: 1. an idle-line in the high state before transmission or reception of a message. 2. a start bit, logic zero, transmitted or received, that indicates the start of each character. 3. data that is transmitted and received least significant bit (lsb) first. 4. a stop bit, logic one, used to indicate the end of a frame. (a frame consists of a start bit, a character of eight or nine data bits, and a stop bit.) 5. a break (defined as the transmission or reception of a logic zero for some mul- tiple number of frames). selection of the word length is controlled by the m bit of sci control register sccr1. 7.2 transmit operation the sci transmitter includes a parallel transmit data register (scdr) and a serial shift register. the contents of the serial shift register can only be written through the scdr. this double buffered operation allows a character to be shifted out serially while an- other character is waiting in the scdr to be transferred into the serial shift register. the output of the serial shift register is applied to txd as long as transmission is in progress or the transmit enable (te) bit of serial communication control register 2 (sccr2) is set. the block diagram, figure 7-1 , shows the transmit serial shift register and the buffer logic at the top of the figure.
motorola serial communications interface MC68HC11F1 7-2 technical data figure 7-1 sci transmitter block diagram 7.3 receive operation during receive operations, the transmit sequence is reversed. the serial shift register receives data and transfers it to a parallel receive data register (scdr) as a complete word. this double buffered operation allows a character to be shifted in serially while another character is already in the scdr. an advanced data recovery scheme distin- guishes valid data from noise in the serial data stream. the data input is selectively sampled to detect receive data, and a majority voting circuit determines the value and integrity of each bit. fe nf or idle rdrf tc tdre scsr interrupt status sbk rwu re te ilie rie tcie tie sccr2 sci control 2 transmitter control logic tcie tc tie tdre sci rx requests sci interrupt request internal data bus pin buffer and control h(8)76543210l 10 (11) - bit tx shift register pd1/ txd scdr tx buffer transfer tx buffer shift enable jam enable preamble?am 1's break?am 0's (write-only) force pin direction (out) size 8/9 wake m t8 r8 sccr1 sci control 1 transmitter baud rate clock ddd1 8 8 8 8
MC68HC11F1 serial communications interface motorola technical data 7-3 figure 7-2 sci receiver block diagram fe nf or idle rdrf tc tdre scsr1 sci status 1 sbk rwu re te ilie rie tcie tie sccr2 sci control 2 wake m t8 r8 wake-up logic rie or ilie idle sci tx requests sci interrupt request internal data bus pd0/ rxd scdr rx buffer stop (8)76543210 10 (11) - bit rx shift register (read-only) sccr1 sci control 1 rie rdrf start msb all ones data recovery ? 16 rwu re m disable driver receiver baud rate clock 8 8 8 pin buffer and control ddd0
motorola serial communications interface MC68HC11F1 7-4 technical data 7.4 wakeup feature the wakeup feature reduces sci service overhead in multiple receiver systems. soft- ware for each receiver evaluates the first character of each message. the receiver is placed in wakeup mode by writing a one to the rwu bit in the sccr2 register. while rwu is one, all of the receiver-related status flags (rdrf, idle, or, nf, and fe) are inhibited (cannot become set). although rwu can be cleared by a software write to sccr2, to do so would be unusual. normally rwu is set by software and is cleared automatically with hardware. whenever a new message begins, logic alerts the sleep- ing receivers to wake up and evaluate the initial character of the new message. two methods of wakeup are available: idle-line wakeup and address-mark wakeup. during idle-line wakeup, a sleeping receiver awakens as soon as the rxd line be- comes idle. in the address-mark wakeup, logic one in the most significant bit (msb) of a character wakes up all sleeping receivers. 7.4.1 idle-line wakeup to use the receiver wakeup method, establish a software addressing scheme to allow the transmitting devices to direct a message to individual receivers or to groups of re- ceivers. this addressing scheme can take any form as long as all transmitting and re- ceiving devices are programmed to understand the same scheme. because the addressing information is usually the first frame(s) in a message, receivers that are not part of the current task do not become burdened with the entire set of addressing frames. all receivers are awake (rwu = 0) when each message begins. as soon as a receiver determines that the message is not intended for it, software sets the rwu bit (rwu = 1), which inhibits further flag setting until the rxd line goes idle at the end of the message. as soon as an idle line is detected by receiver logic, hardware auto- matically clears the rwu bit so that the first frame of the next message can be re- ceived. this type of receiver wakeup requires a minimum of one idle-line frame time between messages, and no idle time between frames in a message. 7.4.2 address-mark wakeup the serial characters in this type of wakeup consist of seven (eight if m = 1) information bits and an msb, which indicates an address character (when set to one, or mark). the first character of each message is an addressing character (msb = 1). all receiv- ers in the system evaluate this character to determine if the remainder of the message is directed toward this particular receiver. as soon as a receiver determines that a message is not intended for it, the receiver activates the rwu function by using a soft- ware write to set the rwu bit. because setting rwu inhibits receiver-related flags, there is no further software overhead for the rest of this message. when the next message begins, its first character has its msb set, which automatically clears the rwu bit and enables normal character reception. the first character whose msb is set is also the first character to be received after wakeup because rwu gets cleared before the stop bit for that frame is serially received. this type of wakeup al- lows messages to include gaps of idle time, unlike the idle-line method, but there is a loss of efficiency because of the extra bit time for each character (address bit) required for all characters.
MC68HC11F1 serial communications interface motorola technical data 7-5 7.5 sci error detection three error conditions, scdr overrun, received bit noise, and framing can occur dur- ing generation of sci system interrupts. three bits (or, nf, and fe) in the serial com- munications status register (scsr) indicate if one of these error conditions exists. the overrun error (or) bit is set when the next byte is ready to be transferred from the receive shift register to the scdr and the scdr is already full (rdrf bit is set). when an overrun error occurs, the data that caused the overrun is lost and the data that was already in scdr is not disturbed. the or is cleared when the scsr is read (with or set), followed by a read of the scdr. the noise flag (nf) bit is set if there is noise on any of the received bits, including the start and stop bits. the nf bit is not set until the rdrf flag is set. the nf bit is cleared when the scsr is read (with fe equal to one) followed by a read of the scdr. when no stop bit is detected in the received data character, the framing error (fe) bit is set. fe is set at the same time as the rdrf. if the byte received causes both fram- ing and overrun errors, the processor only recognizes the overrun error. the framing error flag inhibits further transfer of data into the scdr until it is cleared. the fe bit is cleared when the scsr is read (with fe equal to one) followed by a read of the scdr. 7.6 sci registers there are five addressable registers associated with the sci. sccr1, sccr2, and baud are control registers. scdr is the sci data register and scsr is the sci status register. refer to the baud register description as well as the block diagram for the baud rate generator. 7.6.1 serial communications data register scdr is a parallel register that performs two functions. it is the receive data register when it is read, and the transmit data register when it is written. reads access the re- ceive data buffer and writes access the transmit data buffer. receive and transmit are double buffered. 7.6.2 serial communications control register 1 the sccr1 register provides the control bits that determine word length and select the method used for the wakeup feature. scdr ?sci data register $102f bit 7 654321 bit 0 r7/t7 r6/t6 r5/t5 r4/t4 r3/t3 r2/t2 r1/t1 r0/t0 reset: iiiiiii i sccr1 ?sci control register 1 $102c bit 7 654321 bit 0 r8 t8 m wake reset: i i 00000 0
motorola serial communications interface MC68HC11F1 7-6 technical data r8 ?receive data bit 8 if m bit is set, r8 stores the ninth bit in the receive data character. t8 ?transmit data bit 8 if m bit is set, t8 stores the ninth bit in the transmit data character. m ?mode (select character format) 0 = start bit, 8 data bits, 1 stop bit 1 = start bit, 9 data bits, 1 stop bit wake ?wakeup by address mark/idle 0 = wakeup by idle line recognition 1 = wakeup by address mark (most significant data bit set) 7.6.3 serial communications control register 2 the sccr2 register provides the control bits that enable or disable individual sci functions. tie ?transmit interrupt enable 0 = tdre interrupts disabled 1 = sci interrupt requested when tdre status flag is set tcie ?transmit complete interrupt enable 0 = tc interrupts disabled 1 = sci interrupt requested when tc status flag is set rie ?receiver interrupt enable 0 = rdrf and or interrupts disabled 1 = sci interrupt requested when rdrf flag or the or status flag is set ilie ?idle-line interrupt enable 0 = idle interrupts disabled 1 = sci interrupt requested when idle status flag is set te ?transmitter enable when te goes from zero to one, one unit of idle character time (logic one) is queued as a preamble. 0 = transmitter disabled 1 = transmitter enabled re ?receiver enable 0 = receiver disabled 1 = receiver enabled sccr2 ?sci control register 2 $102d bit 7 654321 bit 0 tie tcie rie ilie te re rwu sbk reset: 0000000 0
MC68HC11F1 serial communications interface motorola technical data 7-7 rwu ?receiver wakeup control 0 = normal sci receiver 1 = wakeup enabled and receiver interrupts inhibited sbk ?send break at least one character time of break is queued and sent each time sbk is written to one. as long as the sbk bit is set, break characters are queued and sent. more than one break may be sent if the transmitter is idle at the time the sbk bit is toggled on and off, as the baud rate clock edge could occur between writing the one and writing the zero to sbk. 0 = break generator off 1 = break codes generated 7.6.4 serial communication status register the scsr provides inputs to the interrupt logic circuits for generation of the sci sys- tem interrupt. tdre ?transmit data register empty flag this flag is set when scdr is empty. clear the tdre flag by reading scsr and then writing to scdr. 0 = scdr busy 1 = scdr empty tc ?transmit complete flag this flag is set when the transmitter is idle (no data, preamble, or break transmission in progress). clear the tc flag by reading scsr and then writing to scdr. 0 = transmitter busy 1 = transmitter idle rdrf ?receive data register full flag this flag is set if a received character is ready to be read from scdr. clear the rdrf flag by reading scsr and then reading scdr. 0 = scdr empty 1 = scdr full idle ?idle line detected flag this flag is set if the rxd line is idle. once cleared, idle is not set again until the rxd line has been active and becomes idle again. the idle flag is inhibited when rwu = 1. clear idle by reading scsr and then reading scdr. 0 = rxd line is active 1 = rxd line is idle scsr ?sci status register $102e bit 7 654321 bit 0 tdre tc rdrf idle or nf fe reset: 1100000 0
motorola serial communications interface MC68HC11F1 7-8 technical data or ?overrun error flag or is set if a new character is received before a previously received character is read from scdr. clear the or flag by reading scsr and then reading scdr. 0 = no overrun 1 = overrun detected nf ?noise error flag nf is set if majority sample logic detects anything other than a unanimous decision. clear nf by reading scsr and then reading scdr. 0 = unanimous decision 1 = noise detected fe ?framing error fe is set when a zero is detected where a stop bit was expected. clear the fe flag by reading scsr and then reading scdr. 0 = stop bit detected 1 = zero detected bit 0 ?not implemented always reads zero 7.6.5 baud rate register use this register to select different baud rates for the sci system. the scp[1:0] bits select the prescaler rate for the scr[2:0] bits. together, these five bits provide multi- ple baud rate combinations for a given crystal frequency. normally, this register is writ- ten once during initialization. the prescaler is set to its fastest rate by default out of reset, and can be changed at any time. refer to table 7-1 and table 7-2 for normal baud rate selections. tclr ?clear baud rate counters (test) scp[1:0] ?sci baud rate prescaler selects refer to the sci baud rate generator block diagram. baud ?baud rate $102b bit 7 654321 bit 0 tclr scp1 scp0 rckb scr2 scr1 scr0 reset: 00000uuu table 7-1 baud rate prescaler selection prescaler divide internal crystal frequency (mhz) scp1 scp0 clock by 4.0 4.9152 8.0 12.0 16.0 20.0 0 0 1 62500 76800 125000 187500 25000 312500 0 1 3 20833 25600 41667 62500 83332 104165 1 0 4 15625 19200 31250 46875 62500 78125 1 1 13 4800 5907 9600 14423 19200 24000
MC68HC11F1 serial communications interface motorola technical data 7-9 rckb ?sci baud rate clock check (test) scr[2:0] ?sci baud rate selects selects receiver and transmitter bit rate based on output from baud rate prescaler stage. refer to the sci baud rate generator block diagram. the prescaler bits, scp[2:0], determine the highest baud rate, and the scr[2:0] bits select an additional binary submultiple ( 3 1 , 3 2, 3 4 , through 3 128) of this highest baud rate. the result of these two dividers in series is the 16x receiver baud rate clock. the scr[2:0] bits are not affected by reset and can be changed at any time, although they should not be changed when any sci transfer is in progress. figure 7-3 and figure 7-4 illustrate the sci baud rate timing chain. the prescaler se- lect bits determine the highest baud rate. the rate select bits determine additional di- vide by two stages to arrive at the receiver timing (rt) clock rate. the baud rate clock is the result of dividing the rt clock by 16. table 7-2 baud rate selection divide prescaler highest baud rate (prescaler output from previous table) scr[2:0] by 4800 19200 76800 312500 0 0 0 1 4800 19200 76800 312500 0 0 1 2 2400 9600 38400 156250 0 1 0 4 1200 4800 19200 78125 0 1 1 8 600 2400 9600 39063 1 0 0 16 300 1200 4800 19531 1 0 1 32 150 600 2400 9766 1 1 0 64 75 300 1200 4883 1 1 1 128 150 600 2441
motorola serial communications interface MC68HC11F1 7-10 technical data figure 7-3 sci baud rate generator block diagram 7.7 status flags and interrupts the sci transmitter has two status flags. these status flags can be read by software (polled) to tell when the corresponding condition exists. alternatively, a local interrupt enable bit can be set to enable each of these status conditions to generate interrupt requests when the corresponding condition is present. status flags are automatically set by hardware logic conditions, but must be cleared by software, which provides an interlock mechanism that enables logic to know when software has noticed the status indication. the software clearing sequence for these flags is automatic ?functions that are normally performed in response to the status flags also satisfy the conditions of the clearing sequence. oscillator and clock generator ( ? 4) xtal extal e as scp1:scp0 sci receive baud rate (16x) sci transmit baud rate (1x) scr2:scr1:scr0 ? 2 ? 2 ? 2 ? 2 ? 2 ? 2 0:0:1 0:1:0 0:1:1 1:0:0 1:0:1 1:1:0 1:1:1 0:0:0 ? 2 ? 16 ? 3 ? 4 ? 13 0:0 0:1 1:0 1:1 internal bus clock (ph2)
MC68HC11F1 serial communications interface motorola technical data 7-11 tdre and tc flags are normally set when the transmitter is first enabled (te set to one). the tdre flag indicates there is room in the transmit queue to store another data character in the tdr. the tie bit is the local interrupt mask for tdre. when tie is zero, tdre must be polled. when tie and tdre are one, an interrupt is requested. the tc flag indicates the transmitter has completed the queue. the tcie bit is the lo- cal interrupt mask for tc. when tcie is zero, tc must be polled; when tcie is one and tc is one, an interrupt is requested. writing a zero to te requests that the transmitter stop when it can. the transmitter completes any transmission in progress before actually shutting down. only an mcu reset can cause the transmitter to stop and shut down immediately. if te is written to zero when the transmitter is already idle, the pin reverts to its general-purpose i/o function (synchronized to the bit-rate clock). if anything is being transmitted when te is written to zero, that character is completed before the pin reverts to general-purpose i/o, but any other characters waiting in the transmit queue are lost. the tc and tdre flags are set at the completion of this last character, even though te has been dis- abled. 7.7.1 receiver flags the sci receiver has five status flags, three of which can generate interrupt requests. the status flags are set by the sci logic in response to specific conditions in the re- ceiver. these flags can be read (polled) at any time by software. refer to figure 7?, which shows sci interrupt arbitration. when an overrun takes place, the new character is lost, and the character that was in its way in the parallel rdr is undisturbed. rdrf is set when a character has been received and transferred into the parallel rdr. the or flag is set instead of rdrf if overrun occurs. a new character is ready to be transferred into rdr before a previous character is read from rdr. the nf and fe flags provide additional information about the character in the rdr, but do not generate interrupt requests. the last receiver status flag and interrupt source come from the idle flag. the rxd line is idle if it has constantly been at logic one for a full character time. the idle flag is set only after the rxd line has been busy and becomes idle, which prevents repeat- ed interrupts for the whole time rxd remains idle.
motorola serial communications interface MC68HC11F1 7-12 technical data figure 7-4 interrupt source resolution within sci yes no rdrf = 1 ? no ?valid sci request begin yes no yes no or = 1 ? rie = 1 ? yes no re = 1 ? yes no yes no tdre = 1 ? tie = 1 ? yes no te = 1 ? yes no yes no tc = 1 ? tcie = 1 ? yes no yes no idle = 1 ? ilie = 1 ? yes no re = 1 ? yes ?valid sci request
MC68HC11F1 serial peripheral interface motorola technical data 8-1 section 8 serial peripheral interface the serial peripheral interface (spi), an independent serial communications sub- system, allows the mcu to communicate synchronously with peripheral devices, such as transistor-transistor logic (ttl) shift registers, liquid crystal display (lcd) drivers, analog-to-digital converter subsystems, and other microprocessors. the spi is also capable of inter-processor communication in a multiple master system. the spi sys- tem can be configured as either a master or a slave device. when configured as a master, data transfer rates can be as high as one-half the e-clock rate (2.5 mbits per second for a 5-mhz bus frequency). when configured as a slave, data transfers can be as fast as the e-clock rate (5 mbits per second for a 5-mhz bus frequency). 8.1 functional description the central element in the spi system is the block containing the shift register and the read data buffer. the system is single buffered in the transmit direction and double buffered in the receive direction. this means that new data for transmission cannot be written to the shifter until the previous transfer is complete; however, received data is transferred into a parallel read data buffer so the shifter is free to accept a second se- rial character. as long as the first character is read out of the read data buffer before the next serial character is ready to be transferred, no overrun condition occurs. a sin- gle mcu register address is used for reading data from the read data buffer and for writing data to the shifter. the spi status block represents the spi status flags (transfer complete, write collision, and mode fault) located in the spi status register (spsr). the spi control block rep- resents those functions that control the spi system through the serial peripheral con- trol register (spcr). refer to figure 8-1 , which shows the spi block diagram.
motorola serial peripheral interface MC68HC11F1 8-2 technical data figure 8-1 spi block diagram 8.2 spi transfer formats during an spi transfer, data is simultaneously transmitted and received. a serial clock line synchronizes shifting and sampling of the information on the two serial data lines. a slave select line allows individual selection of a slave spi device; slave devices that are not selected do not interfere with spi bus activities. on a master spi device, the select line can optionally be used to indicate a multiple master bus contention. refer to figure 8-2 . internal mcu clock divider ? 2 ? 4 ? 16 ? 32 select spi clock (master) 8-bit shift register read data buffer clock clock logic s m m s pin control logic miso/ pd2 mosi/ pd3 sck/ pd4 ss / pd5 m s mstr spe dwom spr1 spr0 mstr spe spie spie spe dwom mstr cpha cpol spr1 spr0 spcr spi control register spif wcol modf spsr spi status register spi control internal data bus spi interrupt request msb lsb 8 8 8
MC68HC11F1 serial peripheral interface motorola technical data 8-3 figure 8-2 spi transfer format 8.2.1 clock phase and polarity controls software can select one of four combinations of serial clock phase and polarity using two bits in the spi control register (spcr). the clock polarity is specified by the cpol control bit, which selects an active high or active low clock, and has no significant ef- fect on the transfer format. the clock phase (cpha) control bit selects one of two dif- ferent transfer formats. the clock phase and polarity should be identical for the master spi device and the communicating slave device. in some cases, the phase and polar- ity are changed between transfers to allow a master device to communicate with pe- ripheral slaves having different requirements. when cpha equals zero, the ss line must be negated and reasserted between each successive serial byte. also, if the slave writes data to the spi data register (spdr) while ss is low, a write collision error results. when cpha equals one, the ss line can remain low between successive transfers. 8.3 spi signals the following paragraphs contain descriptions of the four spi signals: master in slave out (miso), master out slave in (mosi), serial clock (sck), and slave select (ss ). any spi output line must have its corresponding data direction bit in ddrd register set. if the ddr bit is clear, that line is disconnected from the spi logic and becomes a general-purpose input. all spi input lines are forced to act as inputs regardless of the state of the corresponding ddr bits in ddrd register. 2345678 1 sck (cpol = 1) sck (cpol = 0) sck cycle # ss (to slave) 654321 lsb msb msb654321lsb sample input data out sample input data out (cpha = 1) (cpha = 0) slave cpha = 1 transfer in progress master transfer in progress slave cpha = 0 transfer in progress 3 2 1 5 4 ss asserted master writes first sck edge spif set ss negated 1 2 3 4 5 to spdr
motorola serial peripheral interface MC68HC11F1 8-4 technical data 8.3.1 master in slave out miso is one of two unidirectional serial data signals. it is an input to a master device and an output from a slave device. the miso line of a slave device is placed in the high-impedance state if the slave device is not selected. 8.3.2 master out slave in the mosi line is the second of the two unidirectional serial data signals. it is an output from a master device and an input to a slave device. the master device places data on the mosi line a half-cycle before the clock edge that the slave device uses to latch the data. 8.3.3 serial clock sck, an input to a slave device, is generated by the master device and synchronizes data movement in and out of the device through the mosi and miso lines. master and slave devices are capable of exchanging a byte of information during a sequence of eight clock cycles. there are four possible timing relationships that can be chosen by using control bits cpol and cpha in the serial peripheral control register (spcr). both master and slave devices must operate with the same timing. the spi clock rate select bits, spr[1:0], in the spcr of the master device, select the clock rate. in a slave device, spr[1:0] have no effect on the operation of the spi. 8.3.4 slave select the slave select (ss ) input of a slave device must be externally asserted before a master device can exchange data with the slave device. ss must be low before data transactions and must stay low for the duration of the transaction. the ss line of the master must be held high. if it goes low, a mode fault error flag (modf) is set in the serial peripheral status register (spsr). to disable the mode fault circuit, write a one in bit 5 of the port d data direction register. this sets the ss pin to act as a general-purpose output rather than the dedicated input to the slave select cir- cuit, thus inhibiting the mode fault flag. the other three lines are dedicated to the spi whenever the serial peripheral interface is on. the state of the master and slave cpha bits affects the operation of ss . cpha set- tings should be identical for master and slave. when cpha = 0, the shift clock is the or of ss with sck. in this clock phase mode, ss must go high between successive characters in an spi message. when cpha = 1, ss can be left low between succes- sive spi characters. in cases where there is only one spi slave mcu, its ss line can be tied to v ss as long as only cpha = 1 clock mode is used. 8.4 spi system errors two system errors can be detected by the spi system. the first type of error arises in a multiple-master system when more than one spi device simultaneously tries to be a master. this error is called a mode fault. the second type of error, write collision, indicates that an attempt was made to write data to the spdr while a transfer was in progress.
MC68HC11F1 serial peripheral interface motorola technical data 8-5 when the spi system is configured as a master and the ss input line goes to active low, a mode fault error has occurred ?usually because two devices have attempted to act as master at the same time. in cases where more than one device is concurrent- ly configured as a master, there is a chance of contention between two pin drivers. for push-pull cmos drivers, this contention can cause permanent damage. the mode fault mechanism attempts to protect the device by disabling the drivers. the mstr control bit in the spcr and all four ddrd control bits associated with the spi are cleared and an interrupt is generated subject to masking by the spie control bit and the i bit in the ccr. other precautions may need to be taken to prevent driver damage. if two devices are made masters at the same time, mode fault does not help protect either one unless one of them selects the other as slave. the amount of damage possible depends on the length of time both devices attempt to act as master. a write collision error occurs if the spdr is written while a transfer is in progress. be- cause the spdr is not double buffered in the transmit direction, writes to spdr cause data to be written directly into the spi shift register. because this write corrupts any transfer in progress, a write collision error is generated. the transfer continues undis- turbed, and the write data that caused the error is not written to the shifter. a write collision is normally a slave error because a slave has no control over when a master initiates a transfer. a master knows when a transfer is in progress, so there is no reason for a master to generate a write-collision error, although the spi logic can detect write collisions in both master and slave devices. the spi configuration determines the characteristics of a transfer in progress. for a master, a transfer begins when data is written to spdr and ends when spif is set. for a slave with cpha equal to zero, a transfer starts when ss goes low and ends when ss returns high. in this case, spif is set at the middle of the eighth sck cycle when data is transferred from the shifter to the parallel data register, but the transfer is still in progress until ss goes high. for a slave with cpha equal to one, transfer be- gins when the sck line goes to its active level, which is the edge at the beginning of the first sck cycle. the transfer ends in a slave in which cpha equals one when spif is set. 8.5 spi registers the three spi registers, spcr, spsr, and spdr, provide control, status, and data storage functions. refer to the following information for a description of how these reg- isters are organized. 8.5.1 serial peripheral control spcr ?serial peripheral control register $1028 bit 7 654321 bit 0 spie spe dwom mstr cpol cpha spr1 spr0 reset: 000001uu
motorola serial peripheral interface MC68HC11F1 8-6 technical data spie ?serial peripheral interrupt enable set the spe bit to one to request a hardware interrupt sequence each time the spif or modf status ?g is set. spi interrupts are inhibited if this bit is clear or if the i bit in the condition code register is one. 0 = spi system interrupts disabled 1 = spi system interrupts enabled spe ?serial peripheral system enable when the spe bit is set, the port d bit 2, 3, 4, and 5 pins are dedicated to the spi func- tion. if the spi is in the master mode and ddrd bit 5 is set, then the port d bit 5 pin becomes a general-purpose output instead of the ss input. 0 = spi system disabled 1 = spi system enabled dwom ?port d wired-or mode dwom affects all port d pins. 0 = normal cmos outputs 1 = open-drain outputs mstr ?master mode select 0 = slave mode 1 = master mode cpol ?clock polarity when the clock polarity bit is cleared and data is not being transferred, the sck pin of the master device has a steady state low value. when cpol is set, sck idles high. refer to figure 8-2 and 8.2.1 clock phase and polarity controls . cpha ?clock phase the clock phase bit, in conjunction with the cpol bit, controls the clock-data relation- ship between master and slave. the cpha bit selects one of two different clocking protocols. refer to figure 8-2 and 8.2.1 clock phase and polarity controls . spr[1:0] ?spi clock rate selects these two bits select the spi clock (sck) rate when the device is configured as mas- ter. when the device is configured as slave, these bits have no effect. refer to table 8-1 . table 8-1 spi clock rates spr[1:0] e clock divide by frequency at e = 2 mhz frequency at e = 3 mhz frequency at e = 4 mhz frequency at e = 5 mhz 0 0 2 1.0 mhz 1.5 mhz 2.0 mhz 2.5 mhz 0 1 4 500 khz 750 khz 1.0 mhz 625 khz 1 0 16 125 khz 187.5 khz 250 khz 156.25 khz 1 1 32 62.5 khz 93.7 khz 125 khz 78.125 khz
MC68HC11F1 serial peripheral interface motorola technical data 8-7 8.5.2 serial peripheral status spif ?spi interrupt complete flag spif is set upon completion of data transfer between the processor and the external device. if spif goes high, and if spie is set, a serial peripheral interrupt is generated. to clear the spif bit, read the spsr then access the spdr. unless spsr is read (with spif set) ?st, attempts to write spdr are inhibited. wcol ?write collision clearing the wcol bit is accomplished by reading the spsr followed by an access of spdr. refer to 8.3.4 slave select and 8.4 spi system errors . 0 = no write collision 1 = write collision bit 5 ?not implemented always reads zero modf ?mode fault to clear the modf bit, read the spsr then write to the spcr. refer to 8.3.4 slave select and 8.4 spi system errors . 0 = no mode fault 1 = mode fault bits [3:0] ?not implemented always read zero 8.5.3 serial peripheral data register the spdr is used when transmitting or receiving data on the serial bus. only a write to this register initiates transmission or reception of a byte, and this only occurs in the master device. at the completion of transferring a byte of data, the spif status bit is set in both the master and slave devices. a read of the spdr is actually a read of a buffer. to prevent an overrun and the loss of the byte that caused the overrun, the first spif must be cleared by the time a second transfer of data from the shift register to the read buffer is initiated. spi is double buffered in and single buffered out. spsr ?serial peripheral status register $1029 bit 7 654321 bit 0 spif wcol modf reset: 0000000 0 spdr ?spi data register $102a bit 7 654321 bit 0 bit 7 654321 bit 0
motorola serial peripheral interface MC68HC11F1 8-8 technical data
MC68HC11F1 timing system motorola technical data 9-1 section 9 timing system the m68hc11 timing system is composed of five clock divider chains. the main clock divider chain includes a 16-bit free-running counter, which is driven by a programma- ble prescaler. the main timer's programmable prescaler provides one of the four clocking rates to drive the 16-bit counter. two prescaler control bits select the prescale rate. the prescaler output divides the system clock by 1, 4, 8, or 16. taps off of this main clocking chain drive circuitry that generates the slower clocks used by the pulse accu- mulator, the real-time interrupt (rti), and the computer operating properly (cop) watchdog subsystems, also described in this section. refer to figure 9-1 . all main timer system activities are referenced to this free-running counter. the counter begins incrementing from $0000 as the mcu comes out of reset, and contin- ues to the maximum count, $ffff. at the maximum count, the counter rolls over to $0000, sets an overflow flag, and continues to increment. as long as the mcu is run- ning in a normal operating mode, there is no way to reset, change, or interrupt the counting. the capture/compare subsystem features three input capture channels, four output compare channels, and one channel that can be selected to perform either in- put capture or output compare. each of the three input capture functions has its own 16-bit input capture register (time capture latch) and each of the output compare func- tions has its own 16-bit compare register. all timer functions, including the timer over- flow and rti have their own interrupt controls and separate interrupt vectors. the pulse accumulator contains an 8-bit counter and edge select logic. the pulse ac- cumulator can operate in either event counting mode or gated time accumulation mode. during event counting mode, the pulse accumulator's 8-bit counter increments when a specified edge is detected on an input signal. during gated time accumulation mode, an internal clock source increments the 8-bit counter while an input signal has a predetermined logic level. the real-time interrupt (rti) is a programmable periodic interrupt circuit that permits pacing the execution of software routines by selecting one of four interrupt rates. the cop watchdog clock input (e ? 2 15 ) is tapped off of the free-running counter chain. the cop automatically times out unless it is serviced within a specific time by a program reset sequence. if the cop is allowed to time out, a reset is generated, which drives the reset pin low to reset the mcu and the external system. refer to table 9-1 for crystal related frequencies and periods.
motorola timing system MC68HC11F1 9-2 technical data figure 9-1 timer clock divider chains r q ff2 s q oscillator and clock generator as e clock spi sci receiver clock sci transmit clock e ? 2 6 pulse accumulator tcnt real-time interrupt e ? 2 13 ? 4 e ? 2 15 r q force cop reset system reset clear cop timer ff1 (divide by four) internal bus clock (ph2) ic/oc ? 16 cr[1:0] prescaler ( ? 1, 4, 16, 64) prescaler ( ? 2, 4, 16, 32) spr[1:0] prescaler ( ? 1, 3, 4, 13) scp[1:0] prescaler ( ? 1, 2, 4, 8) rtr[1:0] prescaler ( ? 1, 2, 4,....128) scr[2:0] prescaler ( ? 1, 4, 8, 16) pr[1:0] s q tof
MC68HC11F1 timing system motorola technical data 9-3 9.1 timer structure figure 9-2 shows the capture/compare system block diagram. the port a pin control block includes logic for timer functions and for general-purpose i/o. for pins pa3, pa2, pa1, and pa0, this block contains both the edge-detection logic and the control logic that enables the selection of which edge triggers an input capture. the digital lev- el on pa[3:0] can be read at any time (read porta register), even if the pin is being used for the input capture function. pins pa[6:3] are used for either general-purpose i/o, or as output compare pins. when one of these pins is being used for an output compare function, it cannot be written directly as if it were a general-purpose output. each of the output compare functions (oc[5:2]) is related to one of the port a output pins. output compare one (oc1) has extra control logic, allowing it optional control of any combination of the pa[7:3] pins. the pa7 pin can be used as a general-purpose i/o pin, as an input to the pulse accumulator, or as an oc1 output pin. table 9-1 timer summary xtal frequencies 4.0 mhz 8.0 mhz 12.0 mhz 16.0 mhz other rates 1.0 mhz 2.0 mhz 3.0 mhz 4.0 mhz (e) control bits 1000 ns 500 ns 333 ns 250 ns (1/e) pr1, pr0 main timer count rates 0 0 1 count ? overflow ? 1.0 m s 65.536 ms 500 ns 32.768 ms 333 ns 21.845 ms 250 ns 16.384 ms (1/e) (2 16 /e) 0 1 1 count ? overflow ? 4.0 m s 262.14 ms 2.0 m s 131.07 ms 1.333 m s 87.381 ms 1.0 m s 65.536 ms (4/e) (2 18 /e) 1 0 1 count ? overflow ? 8.0 m s 524.29 ms 4.0 m s 262.14 ms 2.667 m s 174.76 ms 2.0 m s 131.07 ms (8/e) (2 19 /e) 1 1 1 count ? overflow ? 16.0 m s 1.049 s 8.0 m s 524.29 ms 5.333 m s 349.52 ms 4.0 m s 262.14 ms (16/e) (2 20 /e)
motorola timing system MC68HC11F1 9-4 technical data figure 9-2 capture/compare block diagram pa3/ oc5/ ic4/ oc1 16-bit latch clk tic1 (hi) 16-bit comparator = ic3f oc2f oc3f i4/o5f tflg1 tmsk1 ic1f ic1i 3 ic2f ic2i 2 ic3i 1 oc4f i4/o5i 16-bit timer bus 16-bit free-running counter tcnt (hi) tof toi 9 pr1 pr0 prescaler?ivide by 1, 4, 8, or 16 i4/o5 oc1i 8 foc1 oc2i 7 foc2 oc3i 6 foc3 oc4i 5 foc4 4 foc5 status flags force output compare interrupt enables port a oc5 ic4 cforc 16-bit timer bus oc1f bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 pin functions tcnt (lo) pa2/ ic1 tic1 (lo) 16-bit latch clk tic2 (hi) tic2 (lo) 16-bit latch clk tic3 (hi) tic3 (lo) toc1 (hi) toc1 (lo) toc2 (hi) toc2 (lo) toc3 (hi) toc3 (lo) toc4 (hi) toc4 (lo) 16-bit latch clk ti4/o5 (hi) ti4/o5 (lo) 16-bit comparator = 16-bit comparator = 16-bit comparator = 16-bit comparator = mcu eclk interrupt requests (further qualified by i-bit in ccr) pin control pa7/ oc1/ pai pa6/ oc2/ oc1 pa5/ oc3/ oc1 pa4/ oc4/ oc1 pa1/ ic2 pa0/ ic3 to pulse accumulator taps for rti, cop watchdog and pulse accumulator
MC68HC11F1 timing system motorola technical data 9-5 9.2 input capture the input capture function records the time an external event occurs by latching the value of the free-running counter when a selected edge is detected at the associated timer input pin. software can store latched values and use them to compute the peri- odicity and duration of events. for example, by storing the times of successive edges of an incoming signal, software can determine the period and pulse width of a signal. to measure period, two successive edges of the same polarity are captured. to mea- sure pulse width, two alternate polarity edges are captured. in most cases, input capture edges are asynchronous to the internal timer counter, which is clocked relative to an internal clock (ph2). these asynchronous capture re- quests are synchronized to ph2 so that the latching occurs on the opposite half cycle of ph2 from when the timer counter is being incremented. this synchronization pro- cess introduces a delay from when the edge occurs to when the counter value is de- tected. because these delays offset each other when the time between two edges is being measured, the delay can be ignored. when an input capture is being used with an output compare, there is a similar delay between the actual compare point and when the output pin changes state. the control and status bits that implement the input capture functions are contained in the pactl, tctl2, tmsk1, and tflg1 registers. to configure port a bit 3 as an input capture, clear the dda3 bit of the ddra register. note that this bit is cleared out of reset. to enable pa3 as the fourth input capture, set the i4/o5 bit in the pactl register. otherwise, pa3 is configured as a fifth output com- pare out of reset, with bit i4/o5 being cleared. if the dda3 bit is set (configuring pa3 as an output), and ic4 is enabled, then writes to pa3 cause edges on the pin to result in input captures. writing to ti4/o5 has no effect when the ti4/o5 register is acting as ic4. 9.2.1 timer control register 2 use the control bits of this register to program input capture functions to detect a par- ticular edge polarity on the corresponding timer input pin. each of the input capture functions can be independently configured to detect rising edges only, falling edges only, any edge (rising or falling), or to disable the input capture function. the input cap- ture functions operate independently of each other and can capture the same tcnt value if the input edges are detected within the same timer count cycle. edgxb and edgxa ?input capture edge control there are four pairs of these bits. each pair is cleared to zero by reset and must be encoded to configure the corresponding input capture edge detector circuit. ic4 func- tions only if the i4/o5 bit in the pactl register is set. refer to table 9-2 for timer con- trol configuration. tctl2 ?timer control 2 $1021 bit 7 654321 bit 0 edg4b edg4a edg1b edg1a edg2b edg2a edg3b edg3a reset: 0000000 0
motorola timing system MC68HC11F1 9-6 technical data 9.2.2 timer input capture registers when an edge has been detected and synchronized, the 16-bit free-running counter value is transferred into the input capture register pair as a single 16-bit parallel trans- fer. timer counter value captures and timer counter incrementing occur on opposite half-cycles of the phase 2 clock so that the count value is stable whenever a capture occurs. the ticx registers are not affected by reset. input capture values can be read from a pair of 8-bit read-only registers. a read of the high-order byte of an input capture register pair inhibits a new capture transfer for one bus cycle. if a double-byte read in- struction, such as ldd, is used to read the captured value, coherency is assured. when a new input capture occurs immediately after a high-order byte read, transfer is delayed for an additional cycle but the value is not lost. ticx not affected by reset. 9.2.3 timer input capture 4/output compare 5 register use ti4/o5 as either an input capture register or an output compare register, depend- ing on the function chosen for the pa3 pin. to enable it as an input capture pin, set the i4/o5 bit in the pulse accumulator control register (pactl) to logic level one. to use it as an output compare register, set the i4/o5 bit to a logic level zero. refer to 9.6 pulse accumulator . the ti4/o5 register pair resets to ones ($ffff). 9.3 output compare use the output compare (oc) function to program an action to occur at a specific time ?when the 16-bit counter reaches a specified value. for each of the five output com- pare functions, there is a separate 16-bit compare register and a dedicated 16-bit com- parator. the value in the compare register is compared to the value of the free-running counter on every bus cycle. when the compare register matches the counter value, an output compare status flag is set. the flag can be used to initiate the automatic actions for that output compare function. tic1?ic3 ?timer input capture $1010?1015 $1010 bit 15 14 13 12 11 10 9 bit 8 tic1 (high) $1011 bit 7 654321 bit 0 tic1 (low) $1012 bit 15 14 13 12 11 10 9 bit 8 tic2 (high) $1013 bit 7 654321 bit 0 tic2 (low) $1014 bit 15 14 13 12 11 10 9 bit 8 tic3 (high) $1015 bit 7 654321 bit 0 tic3 (low) ti4/o5 ?timer input capture 4/output compare 5 $101e, $101f $101e bit 15 14 13 12 11 10 9 bit 8 ti4/o5 (high) $101f bit 7 654321 bit 0 ti4/o5 (low)
MC68HC11F1 timing system motorola technical data 9-7 to produce a pulse of a specific duration, write a value to the output compare register that represents the time the leading edge of the pulse is to occur. the output compare circuit is configured to set the appropriate output either high or low, depending on the polarity of the pulse being produced. after a match occurs, the output compare register is reprogrammed to change the output pin back to its inactive level at the next match. a value representing the width of the pulse is added to the original value, and then writ- ten to the output compare register. because the pin state changes occur at specific values of the free-running counter, the pulse width can be controlled accurately at the resolution of the free-running counter, independent of software latencies. to generate an output signal of a specific frequency and duty cycle, repeat this pulse-generating procedure. there are four 16-bit read/write output compare registers: toc1, toc2, toc3, and toc4, and the ti4/o5 register, which functions under software control as either ic4 or oc5. each of the oc registers is set to $ffff on reset. a value written to an oc register is compared to the free-running counter value during each e-clock cycle. if a match is found, the particular output compare flag is set in timer interrupt flag register 1 (tflg1). if that particular interrupt is enabled in the timer interrupt mask register 1 (tmsk1), an interrupt is generated. in addition to an interrupt, a specified action can be initiated at one or more timer output pins. for oc[5:2], the pin action is controlled by pairs of bits (omx and olx) in the tctl1 register. the output action is taken on each successful compare, regardless of whether or not the ocxf flag in the tflg1 register was previously cleared. oc1 is different from the other output compares in that a successful oc1 compare can affect any or all five of the oc pins. the oc1 output action taken when a match is found is controlled by two 8-bit registers with three bits unimplemented: the output compare 1 mask register, oc1m, and the output compare 1 data register, oc1d. oc1m specifies which port a outputs are to be used, and oc1d specifies what data is placed on these port pins. 9.3.1 timer output compare registers all output compare registers are 16-bit read-write. each is initialized to $ffff at reset. if an output compare register is not used for an output compare function, it can be used as a storage location. a write to the high-order byte of an output compare register pair inhibits the output compare function for one bus cycle. this inhibition prevents inap- propriate subsequent comparisons. coherency requires a complete 16-bit read or write. however, if coherency is not needed, byte accesses can be used. for output compare functions, write a comparison value to output compare registers toc1?oc4 and ti4/o5. when tcnt value matches the comparison value, speci- fied pin actions occur.
motorola timing system MC68HC11F1 9-8 technical data all tocx register pairs reset to ones ($ffff). 9.3.2 timer compare force register the cforc register allows forced early compares. foc[1:5] correspond to the five output compares. these bits are set for each output compare that is to be forced. the action taken as a result of a forced compare is the same as if there were a match be- tween the ocx register and the free-running counter, except that the corresponding interrupt status flag bits are not set. the forced channels trigger their programmed pin actions to occur at the next timer count transition after the write to cforc. the cforc bits should not be used on an output compare function that is pro- grammed to toggle its output on a successful compare because a normal compare that occurs immediately before or after the force can result in an undesirable operation. foc[1:5] ?force output comparison when the foc bit associated with an output compare circuit is set, the output compare circuit immediately performs the action it is programmed to do when an output match occurs. 0 = not affected 1 = output x action occurs bits [2:0] ?not implemented always read zero 9.3.3 output compare mask registers use oc1m with oc1 to specify the bits of port a that are affected by a successful oc1 compare. the bits of the oc1m register correspond to pa[7:3]. toc1?oc4 ?timer output compare $1016?101d $1016 bit 15 14 13 12 11 10 9 bit 8 toc1 (high) $1017 bit 7 654321 bit 0 toc1 (low) $1018 bit 15 14 13 12 11 10 9 bit 8 toc2 (high) $1019 bit 7 654321 bit 0 toc2 (low) $101a bit 15 14 13 12 11 10 9 bit 8 toc3 (high) $101b bit 7 654321 bit 0 toc3 (low) $101c bit 15 14 13 12 11 10 9 bit 8 toc4 (high) $101d bit 7 654321 bit 0 toc4 (low) cforc ?timer compare force $100b bit 7 654321 bit 0 foc1 foc2 foc3 foc4 foc5 reset: 0000000 0
MC68HC11F1 timing system motorola technical data 9-9 oc1m[7:3] ?output compare masks 0 = oc1 is disabled. 1 = oc1 is enabled to control the corresponding pin of port a bits [2:0] ?not implemented always read zero 9.3.4 output compare data register use this register with oc1 to specify the data that is to be stored on the affected pin of port a after a successful oc1 compare. when a successful oc1 compare occurs, a data bit in oc1d is stored in the corresponding bit of port a for each bit that is set in oc1m. if oc1mx is set, data in oc1dx is output to port a bit x on successful oc1 compares. bits [2:0] ?not implemented always read zero 9.3.5 timer counter register the 16-bit read-only tcnt register contains the prescaled value of the 16-bit timer. a full counter read addresses the most significant byte (msb) first. a read of this address causes the least significant byte (lsb) to be latched into a buffer for the next cpu cy- cle so that a double-byte read returns the full 16-bit state of the counter at the time of the msb read cycle. tcnt resets to $0000. in normal modes, tcnt is a read-only register. 9.3.6 timer control register 1 the bits of this register specify the action taken as a result of a successful ocx com- pare. oc1m ?output compare 1 mask $100c bit 7 654321 bit 0 oc1m7 oc1m6 oc1m5 oc1m4 oc1m3 reset: 0000000 0 oc1d ?output compare 1 data $100d bit 7 654321 bit 0 oc1d7 oc1d6 oc1d5 oc1d4 oc1d3 reset: 0000000 0 tcnt ?timer counter $100e, $100f $100e bit 15 14 13 12 11 10 9 bit 8 tcnt (high) $100f bit 7 654321 bit 0 tcnt (low)
motorola timing system MC68HC11F1 9-10 technical data om[2:5] ?output mode ol[2:5] ?output level these control bit pairs are encoded to specify the action taken after a successful ocx compare. oc5 functions only if the i4/o5 bit in the pactl register is clear. refer to table 9-3 for the coding. 9.3.7 timer interrupt mask register 1 use this 8-bit register to enable or inhibit the timer input capture and output compare interrupts. oc1i?c4i ?output compare x interrupt enable if the ocxi enable bit is set when the ocxf flag bit is set, a hardware interrupt se- quence is requested. i4/o5i ?input capture 4/output compare 5 interrupt enable when i4/o5 in pactl is one, i4/o5i is the input capture 4 interrupt enable bit. when i4/o5 in pactl is zero, i4/o5i is the output compare 5 interrupt enable bit. ic1i?c3i ?input capture x interrupt enable if the icxi enable bit is set when the icxf flag bit is set, a hardware interrupt sequence is requested. note bits in tmsk1 correspond bit for bit with flag bits in tflg1. ones in tmsk1 enable the corresponding interrupt sources. tctl1 ?timer control 1 $1020 bit 7 654321 bit 0 om2 ol2 om3 ol3 om4 ol4 om5 ol5 reset: 0000000 0 table 9-2 timer output compare configuration omx olx action taken on successful compare 0 0 timer disconnected from output pin logic 0 1 toggle ocx output line 1 0 clear ocx output line to zero 1 1 set ocx output line to one tmsk1 ?timer interrupt mask 1 $1022 bit 7 654321 bit 0 oc1i oc2i oc3i oc4i i4/o5i ic1i ic2i ic3i reset: 0000000 0
MC68HC11F1 timing system motorola technical data 9-11 9.3.8 timer interrupt flag register 1 bits in this register indicate when timer system events have occurred. coupled with the bits of tmsk1, the bits of tflg1 allow the timer subsystem to operate in either a polled or interrupt driven system. each bit of tflg1 corresponds to a bit in tmsk1 in the same position. clear flags by writing a one to the corresponding bit position(s). oc1f?c4f ?output compare x flag set each time the counter matches output compare x value i4/o5f ?input capture 4/output compare 5 flag set by ic4 or oc5, depending on the function enabled by i4/o5 bit in pactl ic1f?c3f ?input capture x flag set each time a selected active edge is detected on the icx input line 9.3.9 timer interrupt mask register 2 use this 8-bit register to enable or inhibit timer overflow and real-time interrupts. the timer prescaler control bits are included in this register. toi ?timer overflow interrupt enable 0 = tof interrupts disabled 1 = interrupt requested when tof is set to one rtii ?real-time interrupt enable refer to 9.4 real-time interrupt . paovi ?pulse accumulator overflow interrupt enable refer to 9.6.3 pulse accumulator status and interrupt bits . paii ?pulse accumulator input edge interrupt enable refer to 9.6.3 pulse accumulator status and interrupt bits . pr[1:0] ?timer prescaler select these bits are used to select the prescaler divide-by ratio. in normal modes, pr[1:0] can only be written once, and the write must be within 64 cycles after reset. refer to table 9-1 and table 9-4 for specific timing values. tflg1 ?timer interrupt flag 1 $1023 bit 7 654321 bit 0 oc1f oc2f oc3f oc4f i4/o5f ic1f ic2f ic3f reset: 0000000 0 tmsk2 ?timer interrupt mask 2 $1024 bit 7 654321 bit 0 toi rtii paovi paii pr1 pr0 reset: 0000000 0
motorola timing system MC68HC11F1 9-12 technical data note bits in tmsk2 correspond bit for bit with flag bits in tflg2. ones in tmsk2 enable the corresponding interrupt sources. 9.3.10 timer interrupt flag register 2 bits in this register indicate when certain timer system events have occurred. coupled with the four high-order bits of tmsk2, the bits of tflg2 allow the timer subsystem to operate in either a polled or interrupt driven system. each bit of tflg2 corresponds to a bit in tmsk2 in the same position. clear flags by writing a one to the corresponding bit position(s). tof ?timer overflow interrupt flag set when tcnt changes from $ffff to $0000 rtif ?real-time (periodic) interrupt flag refer to 9.4 real-time interrupt . paovf ?pulse accumulator overflow interrupt flag refer to 9.6 pulse accumulator . paif ?pulse accumulator input edge interrupt flag refer to 9.6 pulse accumulator . bits [3:0] ?not implemented always read zero 9.4 real-time interrupt the real-time interrupt (rti) feature, used to generate hardware interrupts at a fixed periodic rate, is controlled and configured by two bits (rtr1 and rtr0) in the pulse accumulator control (pactl) register. the rtii bit in the tmsk2 register enables the interrupt capability. the four different rates available are a product of the mcu oscil- lator frequency and the value of bits rtr[1:0]. refer to table 9-4 , which shows the periodic real-time interrupt rates. table 9-3 timer prescaler selection pr[1:0] prescaler 0 0 1 0 1 4 1 0 8 1 1 16 tflg2 ?timer interrupt flag 2 $1025 bit 7 654321 bit 0 tof rtif paovf paif reset: 0000000 0
MC68HC11F1 timing system motorola technical data 9-13 the clock source for the rti function is a free-running clock that cannot be stopped or interrupted except by reset. this clock causes the time between successive rti time- outs to be a constant that is independent of the software latencies associated with flag clearing and service. for this reason, an rti period starts from the previous time-out, not from when rtif is cleared. every time-out causes the rtif bit in tflg2 to be set, and if rtii is set, an interrupt request is generated. after reset, one entire rti period elapses before the rtif flag is set for the first time. refer to the tmsk2, tflg2, and pactl registers. 9.4.1 timer interrupt mask register 2 this register contains the real-time interrupt enable bits. toi ?timer overflow interrupt enable 0 = tof interrupts disabled 1 = interrupt requested when tof is set to one rtii ?real-time interrupt enable 0 = rtif interrupts disabled 1 = interrupt requested when rtif set to one paovi ?pulse accumulator overflow interrupt enable refer to 9.6 pulse accumulator . paii ?pulse accumulator input edge refer to 9.6 pulse accumulator . pr[1:0] ?timer prescaler select refer to table 9-4 . note bits in tmsk2 correspond bit for bit with flag bits in tflg2. ones in tmsk2 enable the corresponding interrupt sources. table 9-4 rti rate selection rtr[1:0] e = 1 mhz e = 2 mhz e = 3 mhz e = 4 mhz e = x mhz 0 0 0 1 1 0 1 1 8.192 ms 16.384 ms 32.768 ms 65.536 ms 4.096 ms 8.192 ms 16.384 ms 32.768 ms 2.731 ms 5.461 ms 10.923 ms 21.845 ms 2.048 ms 4.096 ms 8.192 ms 16.384 ms (2 13 /e) (2 14 /e) (2 15 /e) (2 16 /e) tmsk2 ?timer interrupt mask register 2 $1024 bit 7 654321 bit 0 toi rtii paovi paii pr1 pr0 reset: 0000000 0
motorola timing system MC68HC11F1 9-14 technical data 9.4.2 timer interrupt flag register 2 bits of this register indicate the occurrence of timer system events. coupled with the four high-order bits of tmsk2, the bits of tflg2 allow the timer subsystem to operate in either a polled or interrupt driven system. each bit of tflg2 corresponds to a bit in tmsk2 in the same position. clear flags by writing a one to the corresponding bit position(s). tof ?timer overflow interrupt flag set when tcnt changes from $ffff to $0000 rtif ?real-time interrupt flag the rtif status bit is automatically set to one at the end of every rti period. to clear rtif, write a byte to tflg2 with bit 6 set. paovf ?pulse accumulator overflow interrupt flag refer to 9.6 pulse accumulator . paif ?pulse accumulator input edge interrupt flag refer to 9.6 pulse accumulator . bits [3:0] ?not implemented always read zero 9.4.3 pulse accumulator control register bits rtr[1:0] of this register select the rate for the rti system. the remaining bits con- trol the pulse accumulator and ic4/oc5 functions. bit 7 ?not implemented always reads zero paen ?pulse accumulator system enable refer to 9.6 pulse accumulator . pamod ?pulse accumulator mode refer to 9.6 pulse accumulator . tflg2 ?timer interrupt flag 2 $1025 bit 7 654321 bit 0 tof rtif paovf paif reset: 0000000 0 pactl ?pulse accumulator control $1026 bit 7 654321 bit 0 paen pamod pedge i4/o5 rtr1 rtr0 reset: 0000000 0
MC68HC11F1 timing system motorola technical data 9-15 pedge ?pulse accumulator edge control refer to 9.6 pulse accumulator . bit 3 ?not implemented always reads zero i4/o5 ?input capture 4/output compare refer to 9.6 pulse accumulator . rtr[1:0] ?rti interrupt rate select these two bits determine the rate at which the rti system requests interrupts. the rti system is driven by an e divided by 2 13 rate clock that is compensated so it is in- dependent of the timer prescaler. these two control bits select an additional division factor. refer to table 9-5 . 9.5 computer operating properly watchdog function the clocking chain for the cop function, tapped off of the main timer divider chain, is only superficially related to the main timer system. the cr[1:0] bits in the option register and the nocop bit in the config register determine the status of the cop function. one additional register, coprst, is used to arm and clear the cop watch- dog reset system. refer to section 5 resets and interrupts for a more de- tailed discussion of the cop function. 9.6 pulse accumulator the MC68HC11F1 mcus have an 8-bit counter that can be configured to operate ei- ther as a simple event counter, or for gated time accumulation, depending on the state of the pamod bit in the pactl register. refer to the pulse accumulator block dia- gram, figure 9-3 . in the event counting mode, the 8-bit counter is incremented by pulses on an external pin (pai). the maximum clocking rate for the external event counting mode is the e clock divided by two. in gated time accumulation mode, a free-running e-clock ? 64 signal drives the 8-bit counter, but only while the external pai pin is activated. refer to table 9-6 . the pulse accumulator counter can be read or written at any time.
motorola timing system MC68HC11F1 9-16 technical data figure 9-3 pulse accumulator pulse accumulator control bits are also located within two timer registers, tmsk2 and tflg2, as described in the following paragraphs. 9.6.1 pulse accumulator control register four of this register's bits control an 8-bit pulse accumulator system. another bit en- ables either the oc5 function or the ic4 function, while two other bits select the rate for the real-time interrupt system. table 9-5 pulse accumulator timing crystal frequency (4 * e) e clock (e) cycle time (1/e) 2 6 /e (64/e) pacnt overflow (16384/e) 4.0 mhz 1.0 mhz 1000 ns 64 m s 16.384 ms 8.0 mhz 2.0 mhz 500 ns 32 m s 8.192 ms 12.0 mhz 3.0 mhz 333 ns 21.33 m s 5.461 ms 16.0 mhz 4.0 mhz 250 ns 16.0 m s 4.096 ms pedge pamod paen pactl control internal data bus pacnt 8-bit counter pa7/ pai/ oc1 interrupt requests paif paovf tflg2 interrupt status paovi paii paovf paovi paif paii tmsk2 int enables 1 2 overflow enable disable flag setting clock pai edge paen paen 2:1 mux output buffer input buffer and edge detector from main timer oc1 data bus pin e ? 64 clock (from main timer) from data direction bit for port a pin 7
MC68HC11F1 timing system motorola technical data 9-17 bit 7 ?not implemented always reads zero paen ?pulse accumulator system enable 0 = pulse accumulator disabled 1 = pulse accumulator enabled pamod ?pulse accumulator mode 0 = event counter 1 = gated time accumulation pedge ?pulse accumulator edge control this bit has different meanings depending on the state of the pamod bit, as shown in table 9-6 . bit 3 ?not implemented always reads zero i4/o5 ?input capture 4/output compare 5 0 = output compare 5 function enable (no ic4) 1 = input capture 4 function enable (no oc5) rtr[1:0] ?rti interrupt rate selects refer to 9.4 real-time interrupt . 9.6.2 pulse accumulator count register this 8-bit read/write register contains the count of external input events at the pai in- put, or the accumulated count. the pacnt is readable even if pai is not active in gat- ed time accumulation mode. the counter is not affected by reset and can be read or written at any time. counting is synchronized to the internal ph2 clock so that incre- menting and reading occur during opposite half cycles. pactl ?pulse accumulator control $1026 bit 7 654321 bit 0 paen pamod pedge i4/o5 rtr1 rtr0 reset: 0000000 0 table 9-6 pulse accumulator edge detection control pamod pedge action on clock 0 0 pai falling edge increments the counter. 0 1 pai rising edge increments the counter. 1 0 a zero on pai inhibits counting. 1 1 a one on pai inhibits counting. pacnt ?pulse accumulator count $1027 bit 7 654321 bit 0 bit 7 654321 bit 0
motorola timing system MC68HC11F1 9-18 technical data 9.6.3 pulse accumulator status and interrupt bits the pulse accumulator control bits, paovi, paii, paovf, and paif are located within timer registers tmsk2 and tflg2. paovi and paovf ?pulse accumulator interrupt enable and overflow flag the paovf status bit is set each time the pulse accumulator count rolls over from $ff to $00. to clear this status bit, write a one in the corresponding data bit position (bit 5) of the tflg2 register. the paovi control bit allows configuring the pulse accumulator overflow for polled or interrupt-driven operation and does not affect the state of paovf. when paovi is zero, pulse accumulator overflow interrupts are inhibited, and the system operates in a polled mode, which requires that paovf be polled by user software to determine when an overflow has occurred. when the paovi control bit is set, a hardware interrupt request is generated each time paovf is set. before leaving the interrupt service routine, software must clear paovf by writing to the tflg2 reg- ister. paii and paif ?pulse accumulator input edge interrupt enable and flag the paif status bit is automatically set each time a selected edge is detected at the pa7/pai/oc1 pin. to clear this status bit, write to the tflg2 register with a one in the corresponding data bit position (bit 4). the paii control bit allows configuring the pulse accumulator input edge detect for polled or interrupt-driven operation but does not af- fect setting or clearing the paif bit. when paii is zero, pulse accumulator input inter- rupts are inhibited, and the system operates in a polled mode. in this mode, the paif bit must be polled by user software to determine when an edge has occurred. when the paii control bit is set, a hardware interrupt request is generated each time paif is set. before leaving the interrupt service routine, software must clear paif by writing to the tflg2 register. tmsk2 ?timer interrupt mask 2 register $1024 bit 7 654321 bit 0 toi rtii paovi paii pr1 pr0 reset: 0000000 0 tflg2 ?timer interrupt flag 2 register $1025 bit 7 654321 bit 0 tof rtif paovf paif reset: 0000000 0
MC68HC11F1 analog-to-digital converter motorola technical data 10-1 section 10 analog-to-digital converter the analog-to-digital (a/d) system, a successive approximation converter, uses an all- capacitive charge redistribution technique to convert analog signals to digital values. 10.1 overview the a/d system is an 8-channel, 8-bit, multiplexed-input converter. the av dd pin is used to input supply voltage to the a/d converter. this allows the supply voltage to be bypassed independently. the converter does not require external sample and hold cir- cuits because of the type of charge redistribution technique used. a/d converter timing can be synchronized to the system e clock, or to an internal resistor capacitor (rc) oscillator. the a/d converter system consists of four functional blocks: multiplexer, an- alog converter, digital control, and result storage. refer to figure 10-1 . 10.1.1 multiplexer the multiplexer selects one of 16 inputs for conversion. input selection is controlled by the value of bits cd?a in the adctl register. the eight port e pins are fixed-direc- tion analog inputs to the multiplexer, and internal analog signal lines are routed to it.
motorola analog-to-digital converter MC68HC11F1 10-2 technical data figure 10-1 a/d converter block diagram port e pins can also be used as digital inputs. reads of port e pins are not recom- mended during the sample portion of an a/d conversion cycle, when the gate signal to the n-channel input gate is on. because no p-channel devices are directly connect- ed to either input pins or reference voltage pins, voltages above v dd do not cause a latchup problem, although current should be limited according to maximum ratings. refer to figure 10-2 , which is a functional diagram of an input pin. pe0/ an0 pe1/ an1 pe2/ an2 pe3/ an3 pe4/ an4 pe5/ an5 pe6/ an6 pe7/ an7 analog mux 8-bit capacitive dac with sample and hold successive approximation register and control adctl a/d control cb cc cd mult scan ccf ca addr 3 a/d result 3 result register interface result internal data bus v rh v rl addr 4 a/d result 4 addr 2 a/d result 2 addr 1 a/d result 1
MC68HC11F1 analog-to-digital converter motorola technical data 10-3 figure 10-2 electrical model of an a/d input pin (sample mode) 10.1.2 analog converter conversion of an analog input selected by the multiplexer occurs in this block. it con- tains a digital-to-analog capacitor (dac) array, a comparator, and a successive ap- proximation register (sar). each conversion is a sequence of eight comparison operations, beginning with the most significant bit (msb). each comparison deter- mines the value of a bit in the successive approximation register. the dac array performs two functions. it acts as a sample and hold circuit during the entire conversion sequence, and provides comparison voltage to the comparator dur- ing each successive comparison. the result of each successive comparison is stored in the sar. when a conversion sequence is complete, the contents of the sar are transferred to the appropriate re- sult register. a charge pump provides switching voltage to the gates of analog switches in the mul- tiplexer. charge pump output must stabilize between 7 and 8 volts, thus a delay of up to 100 m s must be imposed after setting adpu before the converter can be used. the charge pump is enabled by the adpu bit in the option register. power is provided to the a/d converter system through the av dd and av ss pins. 10.1.3 digital control all a/d converter operations are controlled by bits in register adctl. in addition to se- lecting the analog input to be converted, adctl bits indicate conversion status, and control whether single or continuous conversions are performed. finally, the adctl bits determine whether conversions are performed on single or multiple channels. 10.1.4 result registers four 8-bit registers (adr1?dr4) store conversion results. each of these registers can be accessed by the processor in the cpu. the conversion complete flag (ccf) dac capacitance v rl analog input pin ~ 20 pf + ~ 20 v ? ~ 0.7 v < 2 pf input protection device 400 na junction leakage diffusion and poly coupler 4 k w * this analog switch is closed only during the 12-cycle sample time. *
motorola analog-to-digital converter MC68HC11F1 10-4 technical data indicates when valid data is present in the result registers. the result registers are writ- ten during a portion of the system clock cycle when reads do not occur, so there is no conflict. 10.1.5 a/d converter clocks the csel bit in the option register selects whether the a/d converter uses the sys- tem e clock or an internal rc oscillator for synchronization. when the a/d system is operating with the mcu e clock, all switching and comparator functions are synchro- nized to the mcu clocks. this allows the comparator results to be sampled at relatively quiet clock times to minimize noise errors. when e-clock frequency is below 750 khz, charge leakage in the capacitor array can cause errors, and the internal oscillator should be used. the rc clock is asynchronous to the mcu internal e clock. therefore, when the rc clock is used, additional errors can occur because the comparator is sensitive to the additional system clock noise. 10.1.6 conversion sequence a/d converter operations are performed in sequences of four conversions each. a conversion sequence can repeat continuously or stop after one iteration. the conver- sion complete flag (ccf) is set after the fourth conversion in a sequence to show the availability of data in the result registers. figure 10-3 shows the timing of a typical se- quence. synchronization is referenced to the system e clock. figure 10-3 a/d conversion sequence msb 4 cycles e clock write bit 6 2 cyc bit 5 2 cyc bit 4 2 cyc bit 3 2 cyc bit 2 2 cyc bit 1 2 cyc lsb 2 cyc end 12 e cycles sample analog input successive approximation sequence 2 cyc convert fourth channel and update addr4 convert third channel and update addr3 convert second channel and update addr2 convert first channel and update addr1 set repeat e cycles 128 96 64 32 0 to adctl sequence if scan = 1 ccf flag
MC68HC11F1 analog-to-digital converter motorola technical data 10-5 10.2 a/d converter power-up and clock select bit 7 of the option register controls a/d converter power up. clearing adpu re- moves power from and disables the a/d converter system. setting adpu enables the a/d converter system. stabilization of the analog bias voltages requires a delay of as much as 100 m s after turning on the a/d converter. when the a/d converter system is operating with the mcu e clock, all switching and comparator operations are synchro- nized to the mcu clocks. this allows the comparator results to be sampled at quiet times, which minimizes noise errors. the internal rc oscillator is asynchronous to the mcu clock, so noise affects a/d converter results, which lowers accuracy slightly while csel = 1. *can be written only once in first 64 cycles out of reset in normal modes, or at any time in special modes adpu ?a/d power-up 0 = a/d powered down 1 = a/d powered up csel ?clock select 0 = a/d and eeprom use system e clock 1 = a/d and eeprom use internal rc clock irqe ?configure irq for edge-sensitive only operation refer to section 5 resets and interrupts . dly ?enable oscillator start-up delay refer to section 5 resets and interrupts . cme ?clock monitor enable refer to section 5 resets and interrupts . fcme ?force clock monitor enable refer to section 5 resets and interrupts . cr[1:0] ?cop timer rate select bits refer to section 5 resets and interrupts and section 9 timing sys- tem . 10.3 conversion process the a/d conversion sequence begins one e-clock cycle after a write to the a/d control/ status register, adctl. the bits in adctl select the channel and the mode of con- version. an input voltage equal to v rl converts to $00 and an input voltage equal to v rh con- verts to $ff (full scale), with no overflow indication. for ratiometric conversions of this type, the source of each analog input should use v rh as the supply voltage and be referenced to v rl . option ?system configuration options $1039 bit 7 654321 bit 0 adpu csel irqe* dly* cme fcme* cr1* cr0* reset: 0001000 0
motorola analog-to-digital converter MC68HC11F1 10-6 technical data 10.4 channel assignments the multiplexer allows the a/d converter to select one of sixteen analog signals. eight of these channels correspond to port e input lines, four of the channels are internal reference points or test functions, and four channels are reserved. refer to table 10- 1 . *used for factory testing 10.5 single-channel operation there are two types of single-channel operation. when scan = 0, the first type, the single selected channel is converted four consecutive times. the first result is stored in a/d result register 1 (adr1), and the fourth result is stored in adr4. after the fourth conversion is complete, all conversion activity is halted until a new conversion com- mand is written to the adctl register. in the second type of single-channel operation, scan = 1, conversions continue to be performed on the selected channel with the fifth conversion being stored in register adr1 (overwriting the first conversion result), the sixth conversion overwriting adr2, and so on. 10.6 multiple-channel operation there are two types of multiple-channel operation. when scan = 0, the first type, a selected group of four channels is converted one time each. the first result is stored in a/d result register 1 (adr1), and the fourth result is stored in adr4. after the fourth conversion is complete, all conversion activity is halted until a new conversion com- mand is written to the adctl register. in the second type of multiple-channel opera- tion, scan = 1, conversions continue to be performed on the selected group of channels with the fifth conversion being stored in register adr1 (replacing the earlier conversion result for the first channel in the group), the sixth conversion overwriting adr2, and so on. table 10-1 a/d converter channel assignments channel number channel signal result in adrx if mult = 1 1 an0 adr1 2 an1 adr2 3 an2 adr3 4 an3 adr4 5 an4 adr1 6 an5 adr2 7 an6 adr3 8 an7 adr4 9 reserved 10 reserved 11 reserved 12 reserved 13 v rh * adr1 14 v rl * adr2 15 (v rh )/2* adr3 16 reserved* adr4
MC68HC11F1 analog-to-digital converter motorola technical data 10-7 10.7 operation in stop and wait modes if a conversion sequence is in progress when either the stop or wait mode is en- tered, the conversion of the current channel is suspended. when the mcu resumes normal operation, that channel is resampled and the conversion sequence is resumed. as the mcu exits the wait mode, the a/d circuits are stable and valid results can be obtained on the first conversion. however, in stop mode, all analog bias currents are disabled and it is necessary to allow a stabilization period when leaving the stop mode. if the stop mode is exited with a delay (dly = 1), there is enough time for these circuits to stabilize before the first conversion. if the stop mode is exited with no delay (dly bit in option register = 0), allow 10 ms for the a/d circuitry to stabilize to avoid invalid results. 10.8 a/d control/status registers all bits in this register can be read or written, except ccf (bit 7), which is a read-only status indicator, and bit 6, which always reads as zero. write to adctl to initiate a conversion. to quit a conversion in progress, write to this register and a new conver- sion sequence begins immediately. ccf ?conversions complete flag a read-only status indicator, this bit is set when all four a/d result registers contain val- id conversion results. each time the adctl register is overwritten, this bit is automat- ically cleared to zero and a conversion sequence is started. in the continuous mode, ccf is set at the end of the first conversion sequence. bit 6 ?not implemented always reads zero scan ?continuous scan control when this control bit is clear, the four requested conversions are performed once to fill the four result registers. when this control bit is set, conversions continue in a round-robin fashion with the result registers updated as data becomes available. mult ?multiple channel/single channel control when this bit is clear, the a/d converter system is configured to perform four consec- utive conversions on the single channel specified by the four channel select bits cd ca (bits [3:0] of the adctl register). when this bit is set, the a/d system is configured to perform a conversion on each of four channels where each result register corre- sponds to one channel. adctl ?a/d control/status $1030 bit 7 654321 bit 0 ccf scan mult cd cc cb ca reset: 1 0 iiiii i
motorola analog-to-digital converter MC68HC11F1 10-8 technical data note when the multiple-channel continuous scan mode is used, extra care is needed in the design of circuitry driving the a/d inputs. the charge on the capacitive dac array before the sample time is related to the voltage on the previously converted channel. a charge share situa- tion exists between the internal dac capacitance and the external circuit capacitance. although the amount of charge involved is small, the rate at which it is repeated is every 64 m s for an e clock of 2 mhz. the rc charging rate of the external circuit must be balanced against this charge sharing effect to avoid errors in accuracy. refer to m68hc11 reference manual (m68hc11rm/ad) for further informa- tion. cd?a ?channel selects d? refer to table 10-2 . when a multiple channel mode is selected (mult = 1), the two least significant channel select bits (cb and ca) have no meaning and the cd and cc bits specify which group of four channels is to be converted. *used for factory testing 10.9 a/d converter result registers these read-only registers hold an 8-bit conversion result. writes to these registers have no effect. data in the a/d converter result registers is valid when the ccf flag in the adctl register is set, indicating a conversion sequence is complete. if conversion results are needed sooner, refer to figure 10-3 , which shows the a/d conversion se- quence diagram. table 10-2 a/d converter channel selection channel select control bits channel signal result in adrx if mult = 1 cd:cc:cb:ca 0000 an0 adr1 0001 an1 adr2 0010 an2 adr3 0011 an3 adr4 0100 an4 adr1 0101 an5 adr2 0110 an6 adr3 0111 an7 adr4 1000 reserved 1001 reserved 1010 reserved 1011 reserved 1100 v rh * adr1 1101 v rl * adr2 1110 (v rh )/2* adr3 1111 reserved* adr4
MC68HC11F1 analog-to-digital converter motorola technical data 10-9 adr1?dr4 ?a/d results $1031?1034 $1031 bit 7 654321 bit 0 adr1 $1032 bit 7 654321 bit 0 adr2 $1033 bit 7 654321 bit 0 adr3 $1034 bit 7 654321 bit 0 adr4
motorola analog-to-digital converter MC68HC11F1 10-10 technical data
MC68HC11F1 electrical characteristics motorola technical data a-1 appendix a electrical characteristics this appendix contains electrical parameters for the MC68HC11F1 microcontroller. *one pin at a time, observing maximum power dissipation limits. internal circuitry protects the inputs against damage caused by high static voltages or electric fields; however, normal precautions are necessary to avoid application of any voltage higher than maximum-rated voltages to this high-impedance circuit. extended operation at the maximum ratings can adversely affect device reliability. tying unused inputs to an appropriate logic voltage level (either gnd or v dd ) enhances reliability of operation. table a-1 maximum ratings rating symbol value unit supply voltage v dd ?0.3 to + 7.0 v input voltage v in ?0.3 to + 7.0 v operating temperature range MC68HC11F1 MC68HC11F1c MC68HC11F1v MC68HC11F1m t a t l to t h 0 to + 70 ?40 to + 85 ?40 to + 105 ?40 to + 125 c storage temperature range t stg ?55 to + 150 c current drain per pin* excluding v dd , v ss , av dd , v rh , and v rl i d 25 ma
motorola electrical characteristics MC68HC11F1 a-2 technical data notes: 1 this is an approximate value, neglecting p i/o . 2. for most applications p i/o ?p int and can be neglected. 3. k is a constant pertaining to the device. solve for k with a known t a and a measured p d (at equilibrium. use this value of k to solve for p d and t j iteratively for any value of t a table a-2 thermal characteristics characteristic symbol value unit average junction temperature t j t a + (p d x q ja ) c ambient temperature t a user-determined c package thermal resistance (junction-to-ambient) 68-pin plastic leaded chip carrier 80-pin low profile quad flat pack (lqfp, 1.4 mm thick) q ja 50 80 c/w c/w total power dissipation (note 1) p d p int + p i/o k / (t j + 273 c) w device internal power dissipation p int i dd x v dd w i/o pin power dissipation (note 2) p i/o user-determined w a constant (note 3) k p d x (t a + 273 c) + q ja x p d 2 w x c
MC68HC11F1 electrical characteristics motorola technical data a-3 notes: 1. v oh specification for reset and moda is not applicable because they are open-drain pins. v oh specification not applicable to ports c and d in wired-or mode. 2. refer to a/d specification for leakage current for port e. 3. extal is driven with a square wave, and t cyc = 500 ns for 2 mhz rating; t cyc = 333 ns for 3 mhz rating; t cyc = 250 ns for 4 mhz rating; v il 0.2 v; v ih 3 v dd ?0.2 v; no dc loads. table a-3 dc electrical characteristics v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h , unless otherwise noted characteristic symbol min max unit output voltage (note 1) all outputs except xtal all outputs except xtal, reset , and moda i load = 10.0 m a v ol v oh ? v dd ?0.1 0.1 ? v v output high voltage (note 1) all outputs except xtal, reset , and moda i load = ?0.8 ma, v dd = 4.5 v v oh v dd ?0.8 ? v output low voltage all outputs except xtal i load = 1.6 ma v ol ?0.4 v input high voltage all inputs except reset reset v ih 0.7 x v dd 0.8 x v dd v dd + 0.3 v dd + 0.3 v v input low voltage all inputs v il v ss ?0.3 0.2 x v dd v i/o ports, three-state leakage ports a, b, c, d, f, g v in = v ih or v il moda/lir , reset i oz ? 10 m a input leakage current (note 2) v in = v dd or v ss irq , xirq on standard devices v in = v dd or v ss modb/v stby , xirq on eprom devices i in ? ? 1 10 m a m a input current with pull-up resistors v in = v il ports b, f, and g l ipr 100 500 m a ram standby voltage power down v sb 4.0 v dd v ram standby current power down i sb ?20 m a input capacitance pe[7:0], irq , xirq , extal ports a, b, c, d, f, g, moda/lir , reset c in ? ? 8 12 pf pf output load capacitance all outputs except pd[4:1], 4xout, xtal, moda/lir pd[4:1] 4xout c l ? ? 90 200 30 pf pf pf characteristic symbol 2 mhz 3 mhz 4 mhz unit maximum total supply current (note 3) run: expanded mode wait: (all peripheral functions shut down) expanded mode stop: no clocks, expanded mode i dd w idd s idd 27 15 50 38 20 50 50 25 50 ma ma m a maximum power dissipation expanded mode p d 149 209 275 mw
motorola electrical characteristics MC68HC11F1 a-4 technical data figure a-1 test methods 20% of v dd 70% of v dd v dd ?0.8 v 70% of v dd clocks/ strobes inputs spec timing ~v dd spec outputs 20% of v dd ac testing ~v dd ~v ss ~v ss spec notes: 1. full test loads are applied during all dc electrical tests and ac timing measurements. 2. during ac timing measurements, inputs are driven to 0.4 volts and v dd ?0.8 volts while timing measurements are taken at the 20% and 70% of v dd points. clocks/ strobes inputs v dd ?0.8 v 0.4 v nominal timing 20% of v dd 70% of v dd v dd ?0.8 v 0.4 v ~v dd nom outputs 0.4 v dc testing ~v dd ~v ss ~v ss nom 20% of v dd 0.4 v 20% of v dd 70% of v dd 20% of v dd 70% of v dd
MC68HC11F1 electrical characteristics motorola technical data a-5 notes: 1. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted. 2. reset is recognized during the first clock cycle it is held low. internal circuitry then drives the pin low for four clock cycles, releases the pin, and samples the pin level two cycles later to determine the source of the interrupt. refer to section 5 resets and interrupts for further detail. 3. pw rstl = 8 t cyc minimum on mask set c94r only. figure a-2 timer inputs table a-4 control timing v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h characteristic symbol 2.0 mhz 3.0 mhz 4.0 mhz unit min max min max min max frequency of operation f o dc 2.0 dc 3.0 dc 4.0 mhz e-clock period t cyc 500 333 250 ns crystal frequency f xtal 8.0 12.0 16.0 mhz external oscillator frequency 4 f o dc 8.0 dc 12.0 dc 16.0 mhz processor control setup time t pcsu = 1/4 t cyc + 50 ns t pcsu 175 133 113 ns reset input pulse width (notes 2, 3) (to guarantee external reset vector) (minimum input time; can be preempted by internal reset) pw rstl 16 1 16 1 16 1 t cyc t cyc mode programming setup time t mps 2??t cyc mode programming hold time t mph 10?0?0ns interrupt pulse width, irq edge-sensitive mode pw irq = t cyc + 20 ns pw irq 520 353 270 ns wait recovery startup time t wrs ???t cyc timer pulse width, input capture pulse accumulator input pw tim = t cyc + 20 ns pw tim 520 353 270 ns notes: 1. rising edge sensitive input. 2. falling edge sensitive input. 3. maximum pulse accumulator clocking rate is e-clock frequency divided by 2. pa7 2,3 pa7 1,3 pa[3:0] 2 pa[3:0] 1 pw tim
motorola electrical characteristics MC68HC11F1 a-6 technical data figure a-3 por external reset timing diagram t pcsu address moda, modb e extal v dd reset 4064 t cyc fffe fffe fffe new pc fffe ffff fffe fffe fffe new pc fffe ffff fffe t mph pw rstl t mps
MC68HC11F1 electrical characteristics motorola technical data a-7 figure a-4 stop recovery timing diagram pw irq t stopdelay 3 irq 1 irq 2 or xirq e sp ?8 sp ?8 fff2 (fff4) new pc address 4 stop addr stop addr + 1 stop addr + 1 stop addr + 1 stop addr+2 sp?p? fff3 (fff5) opcode resume program with instr which follows the stop instr notes: 1. edge sensitive irq pin (irqe bit = 1) 2. level sensitive irq pin (irqe bit = 0) 3. t stopdelay = 4064 t cyc if dly bit = 1 or 4 t cyc if dly = 0. 4. xirq with x bit in ccr = 1. 5. irq or (xirq with x bit in ccr = 0). internal clocks address 5 stop addr + 1 stop addr
motorola electrical characteristics MC68HC11F1 a-8 technical data figure a-5 wait recovery from interrupt timing diagram t pcsu pcl pch, yl, yh, xl, xh, a, b, ccr stack registers e r/w address wait addr wait addr+1 irq , xirq , or internal interrupts note: reset also causes recovery from wait. sp sp ?1 sp ?2?p ?8 sp ?8 sp ?8?p ?8 sp ?8 sp ?8 sp ?8 vector addr vector addr+1 new pc t wrs
MC68HC11F1 electrical characteristics motorola technical data a-9 figure a-6 interrupt timing diagram e pw irq sp ?8 sp ?8 address new pc next opcode next op + 1 irq 1 vector addr sp ?7 t pcsu irq 2 , xirq or internal interrupt sp sp ?1 sp ?2 sp ?3 sp ?4 sp ?5 sp ?6 vector addr+1 op code ? notes: 1. edge sensitive irq pin (irqe bit = 1). 2. level sensitive irq pin (irqe bit = 0). data pcl pch iyl iyh ixl ixh b a ccr ? vect msb vect lsb op code r/w
motorola electrical characteristics MC68HC11F1 a-10 technical data notes: 1. ports c, d, and g timing is valid for active drive (cwom, dwom, and gwom bits cleared ). 2. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted. figure a-7 port read timing diagram figure a-8 port write timing diagram table a-5 peripheral port timing v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h characteristic symbol 2.0 mhz 3.0 mhz 4.0 mhz unit min max min max min max frequency of operation (e-clock frequency) f o dc 2.0 dc 3.0 dc 4.0 mhz e-clock period t cyc 500 333 250 ns peripheral data setup time (mcu read of ports a, c, d, e, g) t pdsu 100 100 100 ns peripheral data hold time (mcu read of ports a, c, d, e, g) t pdh 50?0?0ns delay time, peripheral data write (mcu write to port a) (mcu write to ports b, c, d, f, and g t pwd = 1/4 t cyc + 100 ns) t pwd 200 225 200 183 200 162 ns e mcu read of port t pdsu ports a, c, d, f ports b, e, g t pdh t pdsu t pdh t pwd e mcu write to port previous port data previous port data new data valid new data valid ports c, d, f ports a, b, g t pwd
MC68HC11F1 electrical characteristics motorola technical data a-11 notes: 1. for f op < 2 mhz, source impedances should equal approximately 10 k w . for f op 3 2 mhz, source impedances should equal approximately 5 k w ?10 k w . source impedances greater than 10 k w affect accuracy adversely be- cause of input leakage. 2. performance verified down to 2.5 v d v r , but accuracy is tested and guaranteed at d v r = 5 v 10% table a-6 analog-to-digital converter characteristics v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h , 750 khz e 3.0 mhz, unless otherwise noted characteristic parameter min absolute 2.0 mhz 3.0 mhz 4.0 mhz unit max max max resolution number of bits resolved by a/d converter 8 bits non-linearity maximum deviation from the ideal a/d transfer characteristics 1 1 1 lsb zero error difference between the output of an ideal and an actual for zero input voltage 1 1 1 lsb full scale error difference between the output of an ideal and an actual a/d for full-scale input voltage 1 1 1 lsb total unadjusted error maximum sum of non-linearity, zero error, and full-scale error 1/2 1 1/2 1 1/2 lsb quantization error uncertainty because of converter resolution 1/2 1/2 1/2 lsb absolute accuracy difference between the actual input voltage and the full-scale weighted equivalent of the binary output code, all error sources included 1 2 2 lsb conversion range analog input voltage range v rl ? rh v rh v rh v v rh maximum analog reference voltage (note 2) v rl ? dd + 0.1 v dd + 0.1 v dd + 0.1 v v rl minimum analog reference voltage (note 2) v ss ?.1 v rh v rh v rh v d v r minimum difference between v rh and v rl (note 2) 3 v conversion time total time to perform a single analog-to-digital conversion: e clock internal rc oscillator 32 t cyc + 32 t cyc + 32 t cyc + 32 t cyc m s monotonicity conversion result never decreases with an increase in input voltage and has no missing codes guaranteed zero input reading conversion result when v in = v rl 00 hex full scale reading conversion result when v in = v rh ff ff ff hex sample acquisition time analog input acquisition sampling time: e clock internal rc oscillator 12 12 12 12 t cyc m s sample/hold capacitance input capacitance during sample pe[7:0] 20 (typ) pf input leakage input leakage on a/d pins pe[7:0] v rl , v rh 400 1.0 400 1.0 400 1.0 na m a
motorola electrical characteristics MC68HC11F1 a-12 technical data notes: 1. input clocks with duty cycles other than 50% affect bus performance. 2. indicates a parameter affected by clock stretching. add n(t cyc ) to parameter value, where: n = 1, 2, or 3 depending on values written to csstrh register. 3. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted. table a-7 expansion bus timing v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h num characteristic symbol 2.0 mhz 3.0 mhz 4.0 mhz unit min max min max min max frequency of operation (e-clock frequency) f o dc 2.0 dc 3.0 dc 4.0 mhz 1 cycle time t cyc = 1/f o t cyc 500 333 250 ns 2 pulse width, e low pw el = 1/2 t cyc ?20 ns pw el 230 147 105 ns 3 pulse width, e high pw eh = 1/2 t cyc ?25 ns (note 2) pw eh 225 142 100 ns 4a 4b e clock rise time fall time t r t f 20 20 20 18 20 15 ns ns 9 address hold time t ah = 1/8 t cyc ?10 ns t ah 53?2?1ns 11 address delay time t ad = 1/8 t cyc + 40 ns t ad 103?2?1ns 12 address valid time to e rise t av = pw el ?t ad t av 128?5?4ns 17 read data setup time t dsr 30?0?0ns 18 read data hold time t dhr 0??ns 19 write data delay time t ddw ?0?0?0ns 21 write data hold time t dhw = 1/8 t cyc t dhw 63?2?1ns 29 mpu address access time t acca = t cyc ?t f ?t dsr ?t ad (note 2) t acca 348 203 144 ns 39 write data setup time t dsw = pw eh ?t ddw (note 2) t dsw 185 102 60 ns 50 e valid chip select delay time t ecsd ?0?0?0ns 51 e valid chip select access time t ecsa = pw eh ?t ecsd ?t dsr (note 2) t ecsa 155?2?0ns 52 chip select hold time t ch 020020020ns 54 address valid chip select delay time t acsd = 1/4 t cyc + 40 ns t acsd 165 123 103 ns 55 address valid chip select access time t acsa = t cyc ?t f ?t dsr ?t acsd (note 2) t acsa 285 162 113 ns 56 address valid to chip select time t avcs 10?0?0ns 57 address valid to data three-state time t avdz ?0?0?0ns
MC68HC11F1 electrical characteristics motorola technical data a-13 figure a-9 expansion bus timing e cs e valid read data write data r/w , address cs ad valid 12 11 4a 2 1 3 4b 9 17 18 21 39 29 19 57 56 54 55 51 50 52
motorola electrical characteristics MC68HC11F1 a-14 technical data notes: 1. all timing is shown with respect to 20% v dd and 70% v dd , unless otherwise noted. 2. signal production depends on software. 3. assumes 200 pf load on all spi pins. table a-8 serial peripheral interface timing v dd = 5.0 vdc 5%, v ss = 0 vdc, t a = t l to t h num characteristic symbol 2.0 mhz 3.0 mhz 4.0 mhz unit min max min max min max operating frequency master slave f op(m) f op(s) dc dc 1.0 2.0 dc dc 1.5 3.0 dc dc 2.0 4.0 mhz mhz 1 cycle time master slave t cyc(m) t cyc(s) 2.0 500 2.0 333 2.0 250 t cyc ns 2 enable lead time master (note 2) slave t lead(m) t lead(s) 250 240 200 ns ns 3 enable lag time master (note 2) slave t lag(m) t lag(s) 250 240 200 ns ns 4 clock (sck) high time master slave t w(sckh)m t w(sckh)s 340 190 227 127 130 85 ns ns 5 clock (sck) low time master slave t w(sckl)m t w(sckl)s 340 190 227 127 130 85 ns ns 6 data setup time (inputs) master slave t su(m) t su(s) 100 100 100 100 100 100 ns ns 7 data hold time (inputs) master slave t h(m) t h(s) 100 100 100 100 100 100 ns ns 8 access time (time to data active from high-impedance state) slave t a 0 120 0 120 0 120 ns 9 disable time (hold time to high-impedance state) slave t dis 240 167 125 ns 10 data valid (after enable edge) (note 3) t v(s) 240 167 125 ns 11 data hold time (outputs) (after enable edge) t ho 0??ns 12 rise time (20% v dd to 70% v dd , c l = 200 pf) spi outputs (sck, mosi, and miso) spi inputs (sck, mosi, miso, and ss ) t rm t rs 100 2.0 100 2.0 100 2.0 ns m s 13 fall time (70% v dd to 20% v dd , c l = 200 pf) spi outputs (sck, mosi, and miso) spi inputs (sck, mosi, miso, and ss ) t fm t fs 100 2.0 100 2.0 100 2.0 ns m s
MC68HC11F1 electrical characteristics motorola technical data a-15 figure a-10 spi master timing (cpha = 0) figure a-11 spi master timing (cpha = 1) see note note: this first clock edge is generated internally but is not seen at the sck pin. sck (cpol = 0) (output) sck (cpol = 1) (output) miso (input) mosi (output) ss (input) see note msb in bit 6 - - - -1 lsb in master msb out master lsb out bit 6 - - - -1 ss is held high on master 10 (ref) 5 113 4 5 12 13 12 4 6 7 11 10 11 (ref) 12 13 note: this last clock edge is generated internally but is not seen at the sck pin. sck (cpol = 0) (output) sck (cpol = 1) (output) miso (input) mosi (output) ss (input) msb in bit 6 - - - -1 lsb in master msb out master lsb out bit 6 - - - -1 ss is held high on master 10 (ref) 113 4 5 12 12 13 4 6 7 11 10 11 (ref) 12 13 5 see note see note
motorola electrical characteristics MC68HC11F1 a-16 technical data figure a-12 spi slave timing (cpha = 0) figure a-13 spi slave timing (cpha = 1) note: not defined but normally msb of character just received. sck (cpol = 0) (input) sck (cpol = 1) (input) miso (output) mosi (input) ss (input) msb in bit 6 - - - -1 lsb in slave msb out slave lsb out bit 6 - - - -1 113 4 5 12 12 4 13 9 10 11 5 3 6 7 11 8 see note 2 note: not defined but normally lsb of character previously transmitted. sck (cpol = 0) (input) sck (cpol = 1) (input) miso (output) mosi (input) ss (input) msb in bit 6 - - - -1 lsb in slave msb out slave lsb out bit 6 - - - -1 113 4 5 12 12 4 13 9 10 11 5 6 7 8 see note 2 10 3
MC68HC11F1 electrical characteristics motorola technical data a-17 notes: 1. the rc oscillator (rco) must be enabled (by setting the csel bit in the option register) for eeprom pro- gramming and erasure when the e-clock frequency is below 1.0 mhz. 2. refer to reliability monitor report (current quarterly issue) for current failure rate information. table a-9 eeprom characteristics v dd = 5.0 vdc 10%, v ss = 0 vdc, t a = t l to t h characteristic temperature range unit 0 to 70, ?40 to 85 ?0 to 105 ?0 to 125 c programming time <1.0 mhz, rco enabled (note 1) 1.0 to 2.0 mhz, rco disabled 3 2.0 mhz (or anytime rco enabled) 10 20 10 15 must use rco 15 20 must use rco 20 ms erase time (note 1) byte, row and bulk 10 10 10 ms write/erase endurance (note 2) 10,000 10,000 10,000 cycles data retention (note 2) 10 10 10 years
motorola electrical characteristics MC68HC11F1 a-18 technical data
MC68HC11F1 motorola technical data b-1 appendix bmechanical data and ordering information b.1 pin assignments the MC68HC11F1 is available in the 80-pin plastic low profile quad flat pack (lqfp) or the 68-pin plastic leaded chip carrier (plcc). refer to table b-1 for ordering infor- mation. figure b-1 MC68HC11F1 68-pin plcc pg3 pg2 pg1 reset pc7/data7 pc6/data6 pc5/data5 pc4/data4 pc3/data3 pc2/data2 pc1/data1 irq xirq pg7/csprog pg6/csgen pg5/csio1 pg4/csio2 pb3/addr11 pb0/addr8 pb1/addr9 pb2/addr10 pb4/addr12 pb5/addr13 pb6/addr14 pe4/an4 pe0/an0 pf0/addr0 pf1/addr1 pf2/addr2 pf3/addr3 pf4/addr4 pf5/addr5 pf6/addr6 pf7/addr7 e modb/v stby moda/lir pc0/data0 extal xtal v ss r/w 4xout pe7/an7 pe3/an3 pe6/an6 pe2/an2 pe5/an5 pe1/an1 v rh v rl pg0 pd3/mosi pd0/rxd pd4/sck pd2/miso pd1/txd pd5/ss pb7/addr15 pa4/oc4/oc1 pa5/oc3/oc1 pa6/oc2/oc1 pa7/pai/oc1 v dd pa3/oc5/ic4/oc1 pa2/ic1 pa1/ic2 pa0/ic3 23 24 10 11 12 13 14 15 16 17 18 45 59 58 57 56 55 54 53 52 51 50 19 20 21 22 49 48 47 46 25 60 6 5 4 3 2 67 68 65 64 63 62 8 7 66 9 34 35 36 37 38 39 27 28 29 30 31 32 33 40 41 42 61 44 26 43 1 MC68HC11F1
motorola MC68HC11F1 b-2 technical data figure b-2 MC68HC11F1 80-pin quad flat pack b.2 package dimensions for case outlines please visit our website at http://design-net.sps.mot.com. pa3/oc5/ic4/oc1 pa5/oc3/oc1 pa4/oc4/oc1 nc pa1/ic2 pa0/ic3 v dd pa2/ic1 pb7/addr15 pd5/ss pd4/sck pd3/mosi pd2/miso pd1/txd 14 15 1 2 3 4 5 6 7 8 9 45 59 58 57 56 55 54 53 52 51 50 10 11 12 13 49 48 47 46 16 60 pf2/addr2 pf1/addr1 pb1/addr9 pb2/addr10 pb3/addr11 pb4/addr12 pb5/addr13 pb6/addr14 nc nc pf7/addr7 pb0/addr8 pf6/addr6 pf3/addr3 pc5/data5 pc7/data7 pc6/data6 pc4/data4 pc3/data3 nc pg1 pg2 pg3 pg4/csio2 pg5/csio1 pg6/csgen pg7/csprog 77 76 75 74 73 70 71 68 67 66 65 79 78 69 28 29 30 31 32 33 21 22 23 24 25 26 27 34 35 36 nc pe2/an2 nc pe6/an6 pe5/an5 pe1/an1 v ss v rh moda/lir e r/w extal 64 44 pc2/data2 pf0/addr0 17 xtal 37 nc 72 63 62 61 pd0/rxd pg0 nc pc0/data0 nc 4xout 38 39 40 pe0/an0 pe4/an4 nc 18 19 20 pc1/data1 nc 43 42 41 80 MC68HC11F1 pa6/oc2/oc1 pa7/pai/oc1 v rl modb/v stby pe7/an7 pe3/an3 pf5/addr5 pf4/addr4 irq xirq reset nc
MC68HC11F1 motorola technical data b-3 b.3 ordering information use the information in table b-1 to specify the appropriate device when placing an order. table b-1 device ordering information description package temperature frequency mc order number no rom, 80-pin lqfp ?40 to + 85 c 2 mhz MC68HC11F1cpu2 512 bytes eeprom, (14 mm x 14 mm, 3 mhz MC68HC11F1cpu3 1024 bytes ram 1.4 mm thick) 4 mhz MC68HC11F1cpu4 ?40 to + 105 c 2 mhz MC68HC11F1vpu2 3 mhz MC68HC11F1vpu3 4 mhz MC68HC11F1vpu4 ?40 to + 125 c 2 mhz MC68HC11F1mpu2 3 mhz MC68HC11F1mpu3 68-pin plcc ?40 to + 85 c 2 mhz MC68HC11F1cfn2 3 mhz MC68HC11F1cfn3 4 mhz MC68HC11F1cfn4 ?40 to + 105 c 2 mhz MC68HC11F1vfn2 3 mhz MC68HC11F1vfn3 4 mhz MC68HC11F1vfn4 ?40 to + 125 c 2 mhz MC68HC11F1mfn2 3 mhz MC68HC11F1mfn3
motorola MC68HC11F1 b-4 technical data
MC68HC11F1 motorola technical data c-1 appendix cdevelopment support c.1 MC68HC11F1 development tools the following table and text provide a reference to development tools for the MC68HC11F1 microcontrollers. for more complete information refer to the appropri- ate manual for each system. * for MC68HC11F1 support, the mmds11 must be used with an MC68HC11F1 emulator module. c.2 mc68hc11evs ?evaluation system the evs is an economical tool for designing, debugging, and evaluating target sys- tems based on the MC68HC11F1 mcu. the two printed circuit boards that comprise the evs are the MC68HC11F1em emulator module (em) and the m68hc11pfb plat- form board (pfb). ?monitor/debugger firmware ?one-line assembler/disassembler ?host computer download capability ?dual memory maps: ? 64 kbyte monitor map that includes 16 kbytes of monitor eprom ? MC68HC11F1 user map that includes 64 kbytes of emulation ram ?otprom, eprom, and eeprom mcu programmer ?mcu extension i/o port for single-chip, expanded, and special-test operation modes ?rs-232c terminal and host i/o ports ?logic analyzer connector c.3 m68mmds11 ?modular development system for m68hc11 devices the m68mmds11 motorola modular development system (mmds11) is a tool for de- veloping embedded systems based on m68hc11 mcus. the mmds11 is an emulator system that provides an on-screen bus state analyzer and real-time memory monitor- ing windows. an integrated design environment includes an editor, an assembler, the user interface, and source-level debug capability. these features significantly reduce the time necessary to develop and debug an embedded mcu system. the compact unit requires minimum space. ?real-time, non-intrusive, in-circuit emulation ?assembly-language source-level debugging table c-1 MC68HC11F1 development tools device evaluation systems modular development systems MC68HC11F1 m68hc11f1evs mmds11*
motorola MC68HC11F1 c-2 technical data ?built-in real-time bus state analyzer: ? 8 kbyte x 64 real-time trace buffer ? four hardware triggers control real-time bus analysis, provide breakpoints ? nine triggering modes ? display of real-time trace data as raw data, disassembled instructions, raw data and disassembled instructions, or assembly-language source code ? as many as 8190 pre- or post-trigger points ? trace buffer can be filled while single-stepping through user software ? 16-bit or 24-bit time tag ? programmable time tag clock source ? 16 general-purpose logic clips, four can trigger bus state analyzer sequencer ?64 kbytes of emulation memory ?32-byte block of real-time memory, can be mapped within a 1 kbyte window any- where in the 64 kbyte m68hc11 memory map. ?six software-selectable oscillator clock sources: five internally generated fre- quencies or an external frequency on a logic clip ?64 possible hardware instruction breakpoints over the 64 kbyte m68hc11 mem- ory map or a one megabyte bank selected memory map. ?four data breakpoints (hardware breakpoints). a data breakpoint can be qualified by an address, an address range, data, or clips. ?script command for automatic execution of mmds11 command sequences ?command and response logging ?a dos personality file for each em that the mmds supports. each personality file provides a foreground memory-map description and a chip information file. ?chipinfo command provides memory-map, vectors, registers, and pin-out infor- mation contained in the personality file ?latch-up resistant design makes power-up sequencing unimportant. ?rs-232 operation speeds as high as 57.6 kbaud ?on-screen, context-sensitive help ?mouse or keyboard control of software ?built-in power supply ?compact size: 15.38 inches (390.6 mm) deep, 10.19 inches (258.83 mm) wide, and 2.75 inches (69.85 mm) high. station module weighs 6.0 pounds (2.72 kg).


▲Up To Search▲   

 
Price & Availability of MC68HC11F1

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X